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”}}}