Store and access your secrets the Kubernetes native way with any external KMS.
Store and access your secrets the Kubernetes native way with any external KMS.
A multi KMS solution supporting the Kubernetes Provider Plugin data encryption for Secrets and ConfigMap in etcd.
Key Features • Why • Documentation • Press • Hands-on Lab • How to test • Roadmap • Contributing • License • Security
Notes:
⚠️ for production deployment, consult the Documentation
Clone the repo and create your environment file:
…Create shared items on target host:
mkdir -p $TR_SOCKET_LOCATION
sudo chown 10123:10123 $TR_SOCKET_LOCATION
sudo chown 10123:10123 $TR_AWSKMS_CREDENTIALS
# On case you haven't enable Vault agen config generation
sudo chown 10123:10123 $TR_VAULT_CONFIGCreate your config files:
# awskms.yaml
profile: profile
keyArn: keyArn
# Optional fields
roleArn: roleArn
encryptionContext:
foo: bar# azurekms.yaml
configFilePath: configFilePath
keyVaultName: keyVaultName
keyName: keyName
keyVersion: keyVersion# vault.yaml
keyNames:
- keyNames
address: address
token: tokenGenerate service files or manifests:
make prod:generate:systemd ENV_LOCATION=./bin/trousseau-env
make prod:generate:docker-compose ENV_LOCATION=./bin/trousseau-env
make prod:generate:kustomize ENV_LOCATION=./bin/trousseau-env
make prod:generate:helm ENV_LOCATION=./bin/trousseau-envVerify output:
ls -l generated_manifests/systemd
ls -l generated_manifests/docker-compose
ls -l generated_manifests/kustomize
ls -l generated_manifests/helmDeploy the application and configure encryption:
kind: EncryptionConfiguration
apiVersion: apiserver.config.k8s.io/v1
resources:
- resources:
- secrets
providers:
- kms:
name: vaultprovider
endpoint: unix:///opt/trousseau-kms/proxy.socket
cachesize: 1000
- identity: {}Reconfigure Kubernetes API server:
kind: ClusterConfiguration
apiServer:
extraArgs:
encryption-provider-config: "/etc/kubernetes/encryption-config.yaml"
extraVolumes:
- name: encryption-config
hostPath: "/etc/kubernetes/encryption-config.yaml"
mountPath: "/etc/kubernetes/encryption-config.yaml"
readOnly: true
pathType: File
- name: sock-path
hostPath: "/opt/trousseau-kms"
mountPath: "/opt/trousseau-kms"Finally restart Kubernetes API server.
No open issues yet, or sync has not completed.