k8s securityContext bypass

3/12/2020

Running k8s 1.6 and in api-server, below is configured:

--enable-admission-plugins SecurityContextDeny

Is it possible to disable it for one pod or is there an exclusion list or override for a deployment.

I need to run a pod with:

      securityContext:
        runAsUser: 0

Not able to figure it out, any pointers?

-- tomarv2
kubernetes
kubernetes-pod

1 Answer

3/12/2020

No, this was a very limited system which is why PodSecurityPolicies were added in 1.8 to be a far more flexible version of the same idea.

-- coderanger
Source: StackOverflow