Automatically inject secrets from Keeper Secrets Manager into your Kubernetes pods at runtime.
- Multiple injection modes - Files (tmpfs), environment variables, or Kubernetes Secrets
- Pod-scoped lifetime - Secrets removed when pod terminates (default mode)
- Automatic sync from Keeper - Sidecar detects changes in Keeper and updates pods without restarts
- Simple configuration - Just two annotations to get started
- Title-based lookup - Reference secrets by name, not UIDs
- Keeper Notation - Use
keeper://UID/field/passwordfor precise extraction - File Attachments - Download files from Keeper records
- Folder Support - Fetch all secrets from a Keeper folder
- Production-ready - HA, metrics, leader election
# Works for both new installation and upgrades
helm upgrade --install keeper-injector oci://registry-1.docker.io/keeper/keeper-injector \
--namespace keeper-security \
--create-namespacehelm repo add keeper https://keeper-security.github.io/helm-charts
helm repo update
helm upgrade --install keeper-injector keeper/keeper-injector \
--namespace keeper-security \
--create-namespacekubectl apply -f https://github.com/Keeper-Security/keeper-k8s-injector/releases/latest/download/install.yamlOption 1: Base64 Config (Recommended)
From Keeper: Vault → Secrets Manager → Select Application → Devices → Add Device → Base64
kubectl create secret generic keeper-auth \
--from-literal=config='<paste-base64-config-here>' \
--namespace defaultOption 2: Config File
kubectl create secret generic keeper-auth \
--from-file=config=ksm-config.json \
--namespace default"YOUR-SECRET-TITLE" with an actual secret title from your Keeper Secrets Manager application.
Create test pod:
cat > test-pod.yaml <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: test-secrets
annotations:
keeper.security/inject: "true"
keeper.security/ksm-config: "keeper-auth"
keeper.security/secret: "YOUR-SECRET-TITLE"
spec:
containers:
- name: busybox
image: busybox:latest
command: ["sleep", "3600"]
EOFDeploy and verify:
kubectl apply -f test-pod.yaml
# pod/test-secrets created
kubectl wait --for=condition=Ready pod/test-secrets --timeout=60s
# pod/test-secrets condition met
kubectl exec test-secrets -- cat /keeper/secrets/YOUR-SECRET-TITLE.json
# {
# "login": "admin",
# "password": "my-secure-password-123",
# "hostname": "db.example.com"
# }
kubectl delete pod test-secretsTry these working examples to see the injector in action:
| Example | Description | Time |
|---|---|---|
| Hello Secrets | Web page displaying secret values | 5 min |
| PostgreSQL | Real database credential injection | 10 min |
| Rotation Dashboard | Live secret rotation visualization | 5 min |
# Clone the repo
git clone https://github.com/Keeper-Security/keeper-k8s-injector.git
cd keeper-k8s-injector
# Run the hello-secrets example
kubectl apply -f examples/01-hello-secrets/
kubectl port-forward svc/hello-secrets 8080:80
# Open http://localhost:8080📖 View Full Documentation - Complete guide with tutorials and reference
Quick Links:
- Installation Guide - Get started in 5 minutes
- Configuration Reference - All annotations and settings
- Examples - 14 working examples
- Troubleshooting - Common issues
keeper.security/secrets: "database-creds, api-keys, tls-cert"keeper.security/secret-db: "/app/config/database.json"
keeper.security/secret-api: "/etc/myapp/api.json"keeper.security/refresh-interval: "5m"
keeper.security/signal: "SIGHUP"keeper.security/secret-password: "keeper://QabbPIdM8Unw4hwVM-F8VQ/field/password:/app/secrets/db-pass"keeper.security/file-cert: "Database Credentials:cert.pem:/app/certs/server.pem"| Feature | Keeper Injector | External Secrets Operator |
|---|---|---|
| Creates K8s Secrets | Optional | Yes (always) |
| Secret storage | Pod tmpfs (default) | etcd |
| Secrets in etcd backups | Optional | Yes |
| Configuration | Annotations | CRDs |
| Sync from Keeper | Sidecar polling | Controller polling |
| Pod isolation | Yes (default) | Shared secrets |
Use Keeper Injector when: Security is paramount, you need secrets out of etcd, or require per-pod isolation.
Use ESO when: You need all secrets as K8s Secret objects, or prefer CRD-based GitOps workflows.
| Image | Description |
|---|---|
keeper/injector-webhook |
Mutating admission webhook |
keeper/injector-sidecar |
Sidecar container for secret fetching |
Images are available on Docker Hub with multi-arch support (amd64, arm64).
- Kubernetes 1.21+ (tested with 1.21-1.34)
- Keeper Secrets Manager application
TLS certificates are auto-generated. cert-manager is optional.
Contributions are welcome! Please open an issue or pull request.
MIT License - see LICENSE for details.