Passing vHSM secrets using ConfigMaps
Learn to inject vHSM secrets using ConfigMaps to an application running in Kubernetes.
Prerequisites
Deploy a sample application
apiVersion: apps/v1 kind: Deployment metadata: name: my-app spec: replicas: 2 selector: matchLabels: app: my-app template: metadata: labels: app: my-app spec: containers: - name: my-app image: nginx ports: - containerPort: 80kubectl apply -f app-deployment.yamldeployment.apps/my-app createdkubectl get podsNAME READY STATUS RESTARTS AGE my-app-86d5bc587d-g85bz 1/1 Running 0 7s my-app-86d5bc587d-j4x4p 1/1 Running 0 7skubectl expose deployment my-app --type=NodePort --port=80kubectl get svc my-appNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-app NodePort 10.96.114.36 <none> 80:32696/TCP 8skubectl port-forward svc/my-app 8080:80
Enable vHSM secrets engine and store the secret
Create a ConfigMap from vHSM secrets
Last updated
Was this helpful?