diff --git a/roles/kubernetes/node/templates/manifests/kube-vip.manifest.j2 b/roles/kubernetes/node/templates/manifests/kube-vip.manifest.j2 index 35b6f0eee..8033a2641 100644 --- a/roles/kubernetes/node/templates/manifests/kube-vip.manifest.j2 +++ b/roles/kubernetes/node/templates/manifests/kube-vip.manifest.j2 @@ -104,11 +104,16 @@ spec: imagePullPolicy: {{ k8s_image_pull_policy }} name: kube-vip resources: {} +{% if kube_vip_lb_fwdmethod == "masquerade" %} + securityContext: + privileged: true +{% else %} securityContext: capabilities: add: - NET_ADMIN - NET_RAW +{% endif %} volumeMounts: - mountPath: /etc/kubernetes/admin.conf name: kubeconfig