Deep Dive: Vault Agent Injector for Kubernetes
This is part of the Vault + Kubernetes Integration Guide. Return to the main guide for the full architecture overview. The Vault Agent Injector uses a Kubernetes mutating admission webhook to automatically inject a Vault Agent sidecar into your pods. The sidecar handles authentication, secret retrieval, templating, and token renewal — your application just reads files from a shared volume. Architecture ┌─────────────────────────────────────────────────────────────┐ │ Kubernetes Cluster │ │ │ │ ┌─ Pod ──────────────────────────────────────────────────┐ │ │ │ │ │ │ │ ┌──────────────┐ shared ┌──────────────────────┐ │ │ │ │ │ App │ tmpfs │ Vault Agent │ │ │ │ │ │ Container │◄─────────►│ Sidecar │ │ │ │ │ │ │ volume │ │ │ │ │ │ │ Reads from │ │ - Auto-auth │ │ │ │ │ │ /vault/ │ │ - Secret fetching │ │ │ │ │ │ secrets/ │ │ - Template rendering│ │ │ │ │ └──────────────┘ │ - Token renewal │ │ │ │ │ └──────────┬───────────┘ │ │ │ └─────────────────────────────────────────┼─────────────┘ │ │ │ │ │ ┌──────────────────┐ │ │ │ │ Injector │ Webhook │ Auth + Read │ │ │ Controller │ intercepts │ │ │ │ (Deployment) │ pod creation ▼ │ │ └──────────────────┘ ┌──────────────┐ │ │ │ Vault Server │ │ │ └──────────────┘ │ └─────────────────────────────────────────────────────────────┘ Installation The injector is installed alongside Vault via the Helm chart:...