Skip to content

Instantly share code, notes, and snippets.

@DeekshithSN
Last active April 6, 2021 07:26
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/73ac50ee3ef3d524c067ed702ef949ae to your computer and use it in GitHub Desktop.
Save DeekshithSN/73ac50ee3ef3d524c067ed702ef949ae to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: webapp
spec:
replicas: 1
selector:
matchLabels:
app: webapp
template:
metadata:
labels:
app: webapp
spec:
containers:
- image: deekshithsn/go-url-shortener:1.0
name: go-url-shortener
ports:
- containerPort: 8080
env:
- name: POSTGRES_HOST
value: postgres
- name: POSTGRES_PORT
value: "5432"
- name: POSTGRES_DATABASE
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