Skip to content

Instantly share code, notes, and snippets.

@JFWenisch
Last active August 12, 2020 16:30
Show Gist options
  • Save JFWenisch/042095e24b6a9df939462e09049c6be9 to your computer and use it in GitHub Desktop.
Save JFWenisch/042095e24b6a9df939462e09049c6be9 to your computer and use it in GitHub Desktop.
spec.template.spec.containers[0].securityContext.privileged: Forbidden: disallowed by cluster policy

Most likely your deployment is using "privileged=true".

To allow privileged containers add --allow-privileged=true to the kubelet und kube-apiserver config

sudo "--allow-privileged=true" >> /var/snap/microk8s/current/args/kube-apiserver

Afterwards restart services

sudo systemctl restart snap.microk8s.daemon-apiserver.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment