Skip to content

Instantly share code, notes, and snippets.

@sandromello
Created July 29, 2024 22:35
Show Gist options
  • Save sandromello/fb4d9b37d2e3c7646b6c7f99ddc3ff13 to your computer and use it in GitHub Desktop.
Save sandromello/fb4d9b37d2e3c7646b6c7f99ddc3ff13 to your computer and use it in GitHub Desktop.
postgres-deploy
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
spec:
selector:
matchLabels:
app: postgres
strategy:
type: Recreate
template:
metadata:
labels:
app: postgres
spec:
containers:
- image: "postgres"
name: postgres
env:
- name: POSTGRES_USER
value: 'root'
- name: POSTGRES_PASSWORD
value: '1a2b3c4d'
- name: POSTGRES_DB
value: 'apptest'
ports:
- containerPort: 5432
name: pg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment