Skip to content

Instantly share code, notes, and snippets.

@DeekshithSN
Created April 6, 2021 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeekshithSN/559337f2efe98f3b2b0d6f7e210c0bee to your computer and use it in GitHub Desktop.
Save DeekshithSN/559337f2efe98f3b2b0d6f7e210c0bee to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
spec:
replicas: 1
selector:
matchLabels:
app: postgres
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