morvencao / kube-sidecar-injector

A Kubernetes mutating webhook server that implements sidecar injection
Apache License 2.0
628 stars 454 forks source link

permission issue when injecting to the non-default namespace #7

Open orvardi opened 5 years ago

orvardi commented 5 years ago

Hello, I have followed the tutorial and managed to deploy and run an injected pod. However, when I run the same deployment definition in a different namespace, it is unable to start the pod. I have labeled the new namespace as instructed.

Are there any additional steps needed in order to inject pods in another namespace?

morvencao commented 4 years ago

Sorry for late response. I have added some troubleshooting steps here: https://github.com/morvencao/kube-mutating-webhook-tutorial#troubleshooting Please check if that helps.

morvencao commented 4 years ago

It's more likely that your issue is caused by permission issue. Please try the latest code, I have made some updated for docker image to make it run as non-root user.