Kubernetes 解决spec.template.spec.containers[0].securityContext.privileged: Forbid

Kubernetes 解决spec.template.spec.containers[0].securityContext.privileged: Forbidden: disallowed by policy问题

 

Add --allow_privileged=true to the startup scripts of kube-apiserver and kubelet, if not, when deploying calico

 

vi /etc/sysconfig/kube-apiserver

 

KUBE_APISERVER_OPTS='--allow_privileged=true'

 

 

systemctl daemon-reload

systemctl restart kube-apiserver

systemctl status -l kube-apiserver

curl -L http://10.99.0.10:8080/healthz

 

on the node machine

vi / etc / sysconfig / kubelet

 

KUBELET_OPTS='--allow_privileged=true'

systemctl daemon-reload

systemctl restart kubelet

systemctl status -l kubelet

 

Reference: http://www.bubuko.com/infodetail-1928925.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326535445&siteId=291194637