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

 

相关文章:

  • 2022-03-01
  • 2021-05-21
  • 2022-12-23
  • 2021-10-03
  • 2022-01-16
  • 2022-12-23
  • 2021-12-29
  • 2021-11-24
猜你喜欢
  • 2021-05-06
  • 2022-01-12
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
  • 2021-07-29
相关资源
相似解决方案