Skip to content

Instantly share code, notes, and snippets.

@ahma
Created December 12, 2018 00:34
Show Gist options
  • Save ahma/9c9ae463fead8a950530418064cf25f3 to your computer and use it in GitHub Desktop.
Save ahma/9c9ae463fead8a950530418064cf25f3 to your computer and use it in GitHub Desktop.
secret demo
apiVersion: v1
kind: List
items:
- kind: Pod
apiVersion: v1
metadata:
name: prod-db-client-pod
labels:
name: prod-db-client
spec:
volumes:
- name: secret-volume
secret:
secretName: prod-db-secret
containers:
- name: db-client-container
image: myClientImage
volumeMounts:
- name: secret-volume
readOnly: true
mountPath: "/etc/secret-volume"
- kind: Pod
apiVersion: v1
metadata:
name: test-db-client-pod
labels:
name: test-db-client
spec:
volumes:
- name: secret-volume
secret:
secretName: test-db-secret
containers:
- name: db-client-container
image: myClientImage
volumeMounts:
- name: secret-volume
readOnly: true
mountPath: "/etc/secret-volume"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment