Created
November 19, 2017 15:50
-
-
Save xcoulon/546e7b4c1645c0936f12a487217d2a42 to your computer and use it in GitHub Desktop.
Managing Pod configuration using ConfigMaps and Secrets in Kubernetes (resource for the story on Medium)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: postgres | |
spec: | |
template: | |
metadata: | |
labels: | |
app: postgres | |
spec: | |
containers: | |
- name: postgres | |
image: postgres:9.6.5 | |
ports: | |
- containerPort: 5432 | |
env: | |
- name: POSTGRES_DB | |
valueFrom: | |
secretKeyRef: | |
name: database-secret-config | |
key: dbname | |
- name: POSTGRES_USER | |
valueFrom: | |
secretKeyRef: | |
name: database-secret-config | |
key: username | |
- name: POSTGRES_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
name: database-secret-config | |
key: password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment