From f42e0a4711b24e9dbe3a526ed517174a97f616af Mon Sep 17 00:00:00 2001 From: Frank Ritchie Date: Tue, 11 Sep 2018 10:34:36 -0400 Subject: [PATCH] Change update strategy to RollingUpdate. When enable_network_policy is set to True with Calico 3 kubectl apply fails with the error: The Deployment "calico-kube-controllers" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy type is 'Recreate' See https://github.com/kubernetes-incubator/kubespray/issues/3267 Changing the update strategy to RollingUpdate avoids this error. --- .../calico/templates/calico-kube-controllers.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes-apps/policy_controller/calico/templates/calico-kube-controllers.yml.j2 b/roles/kubernetes-apps/policy_controller/calico/templates/calico-kube-controllers.yml.j2 index d99466248..be690bb0a 100644 --- a/roles/kubernetes-apps/policy_controller/calico/templates/calico-kube-controllers.yml.j2 +++ b/roles/kubernetes-apps/policy_controller/calico/templates/calico-kube-controllers.yml.j2 @@ -11,7 +11,7 @@ metadata: spec: replicas: 1 strategy: - type: Recreate + type: RollingUpdate selector: matchLabels: kubernetes.io/cluster-service: "true"