修改statefulset 有些不允許直接修改


1、比如修改一個storageClassName: hostpath   會報錯

意思是除了 'replicas', 'template',  'updateStrategy'   其他部分都是不可以改的  怎么辦?

[root@master1 statefulset]# kubectl apply -f web.yaml
service/nginx unchanged
The StatefulSet "web" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden

2、備份一下當前 statefulset 的配置文件  把當前的 statefulset刪掉 重新apply新的文件

kubectl delete statefulsets.apps  web

kubectl apply -f new.yaml

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM