Created
December 6, 2023 19:00
-
-
Save sandromello/ab8b3c5c7728df0d0f3023a944063793 to your computer and use it in GitHub Desktop.
Postgres Deployment
This file contains 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/v1 | |
kind: Deployment | |
metadata: | |
name: postgres | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: postgres | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: postgres | |
spec: | |
containers: | |
- env: | |
- name: POSTGRES_USER | |
value: root | |
- name: POSTGRES_PASSWORD | |
value: 1a2b3c4d | |
- name: POSTGRES_DB | |
value: hoopdb | |
image: postgres | |
name: postgres | |
ports: | |
- containerPort: 5432 | |
name: pg | |
protocol: TCP | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: pg | |
spec: | |
ports: | |
- name: pg | |
port: 5432 | |
protocol: TCP | |
targetPort: 5432 | |
selector: | |
app: postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment