当部署策略从“滚动更新”更改为“重新创建”时,我面临以下错误
Failure executing: PATCH at: https://3x.xxx.2x1.xxx/apis/extensions/v1beta1/namespaces/default/deployments/xxxxxx. Message: Deployment.apps "xxxxxx" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy type is 'Recreate'. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.strategy.rollingUpdate, message=Forbidden: may not be specified when strategy type is 'Recreate', reason=FieldValueForbidden, additionalProperties={})], group=apps, kind=Deployment, name=xxxxxx, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Deployment.apps "xxxxxx" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy type is 'Recreate', metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
对此有何帮助?我正在使用Spinnaker 1.6.0
答案 0 :(得分:1)
GitHub上有很多与此问题相关的门票:Kubernetes,Cert-manager,Spinnaker。在每一个中你都可以找到相同的答案 - 无法切换已创建资源的更新策略。
因此,唯一的方法是在Kubernetes中实施更新过程,以新策略创建新部署。