Creating a new Kubernetes Object from within a Mutating Admission Controller

8/7/2019

Can a Mutating Admission Controller update/create another Object by connecting to api-server ? I see that we can use JSON Patch to mutate the inbound object via Admission Review, but can I extend it to create a completely different object ? Thanks!! -Sreeni

-- Sreeni
go
kubernetes

1 Answer

8/8/2019

You can create a mutatingwebhookconfigurations which basically hooks a service to the mutating admission controller. That's how istio inject a sidecar proxy to all the pods which has istio-injection enabled.

You can refer to the following link Sidecar Injection Webhook

-- Hang Du
Source: StackOverflow