Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes kubectl修补程序状态设置更新策略滚动更新未修补_Kubernetes - Fatal编程技术网

Kubernetes kubectl修补程序状态设置更新策略滚动更新未修补

Kubernetes kubectl修补程序状态设置更新策略滚动更新未修补,kubernetes,Kubernetes,我无法修补状态集以使用RollingUpdate策略 (在学习“StatefulSet Basics”教程时遇到) 我希望kubectl patch能够返回更多关于无法修补statefulset的原因的信息 kubectl edit告诉我 发现v1beta1.StatefulSetSpec的字段UpdateStregy无效 但我不确定我是否将键和值放在了正确的位置,以确保这是补丁遇到的同一问题 如何告诉我的StatefolSet使用RollingUpdate策略 要重现这个问题,只需在这里遵循K

我无法修补状态集以使用
RollingUpdate
策略

(在学习“StatefulSet Basics”教程时遇到)

我希望
kubectl patch
能够返回更多关于无法修补statefulset的原因的信息

kubectl edit
告诉我

发现v1beta1.StatefulSetSpec的字段UpdateStregy无效

但我不确定我是否将键和值放在了正确的位置,以确保这是补丁遇到的同一问题

如何告诉我的StatefolSet使用RollingUpdate策略


要重现这个问题,只需在这里遵循Kubernetes教程:

最好直接在yaml文件上应用更改

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: nginx-sts
spec:
  serviceName: "nginx-headless"
  replicas: 3
  #podManagementPolicy: Parallel
  selector:
    matchLabels:
      run: nginx-sts-demo
  updateStrategy:
    rollingUpdate:
      partition: 0   #for full partition update            
    type: RollingUpdate  

最好直接在yaml文件上应用更改

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: nginx-sts
spec:
  serviceName: "nginx-headless"
  replicas: 3
  #podManagementPolicy: Parallel
  selector:
    matchLabels:
      run: nginx-sts-demo
  updateStrategy:
    rollingUpdate:
      partition: 0   #for full partition update            
    type: RollingUpdate  

你在运行kubernetes 1.7?否则这就不行了。哦。。。我正在运行v1.6.4:/补丁应该是:
'{“spec”:{“updateStrategy”:{“type”:“RollingUpdate”}}}
您正在运行kubernetes 1.7吗?否则这就不行了。哦。。。我正在运行v1.6.4:/补丁应该是:
'{“spec”:{“updateStrategy”:{“type”:“RollingUpdate”}}}