5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Microk8sでDeploymentをApplyしようとすると「Forbidden: disallowed by cluster policy」とでる

Posted at

メッセージ内容

privilegestrueだと怒られてデプロイできない

The Deployment "test" is invalid: spec.template.spec.containers[0].securityContext.privileged: Forbidden: disallowed by cluster policy

許容する設定を入れる

vim /var/snap/microk8s/current/args/kubelet
vim /var/snap/microk8s/current/args/kube-apiserver

パラメーターを追加

--allow-privileged=true

変更反映

systemctl restart snap.microk8s.daemon-kubelet.service
systemctl restart snap.microk8s.daemon-apiserver.service
5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?