Comments (3)
Got the same issue on AWS EKS v1.21, but made it to work. Looks like main problem lies in MutatingWebhookConfiguration
. In original example manifests, webhook config had
apiVersion: admissionregistration.k8s.io/v1beta1
which was refused by K8s in my case, had to modify it to
apiVersion: admissionregistration.k8s.io/v1
To conform with K8s requirements for this API version, I had to add additional keys for sideEffects:
and admissionReviewVersions:
(K8s docs here).
Two WAG's followed :: first one for sideEffects
where i put 'None', second one for admissionReviewVersions
where i started with 'v1'. This led to successful deployment of MutatingWebhookConfiguration
, but the sidecars were not being added to test pods / deployments, same as for both of you. Search through codebase got me to webhook.go line 613 ::
admissionReview := v1beta1.AdmissionReview{}
Change of admissionReviewVersions
from v1
to v1beta1
got the problem solved, sidecar started as expected.
Here's a gist with example mutating-webhook-configuration.yaml
Hope this helps.
from k8s-sidecar-injector.
Very same here. Running on Azure Kubernetes with K8s v1.23.5
from k8s-sidecar-injector.
So helpful! Thank you! I also had this issue.
I've taken your image updates and pushed it to docker hub if anyone else would like to use it. mindovermiles262/sidecar-injector
Change the deployment.yaml
image to:
spec:
template:
spec:
containers:
- name: "k8s-sidecar-injector"
[ ... ]
# image: tumblr/k8s-sidecar-injector:latest <-- Comment this line out, and update
image: mindovermiles262/sidecar-injector
Note, this image works with the updated mutating webhook configuration where the apiVersion: admissionregistration.k8s.io/v1
and webhooks.sideEffects: None
from k8s-sidecar-injector.
Related Issues (20)
- Status annotation ignores custom annotation namespace HOT 2
- serviceMonitor error HOT 2
- injected pod has no volume and hostPid property HOT 4
- sidercar-configmap namesapces must equal with k8s-sidecar-injector-prod namespace HOT 2
- deployment LOG_LEVEL don't have effect HOT 1
- ServiceAccount Token missing in sidecar HOT 8
- Remove glog
- Feature Request: Add ExecAction to config(map)
- how to config different configmap for different pod in one statefulset HOT 1
- Default injection for all new containers? HOT 2
- sidecar container inject failed on kubernetes 1.14.3 HOT 5
- Question: Being able to inject in kube-system namespace
- Feature request: inject container at the top of the list of containers
- Ignored namespaces aren't skipped for Deployment pods HOT 3
- openshift copy runAsUser form main container
- serviceaccount in sidecar not inject into pod with another serviceaccount
- sidecar injected though no configmap created, therefore init does not come up
- Add default request from namespace annotation HOT 4
- cofigmaps have the same name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k8s-sidecar-injector.