tye/docs/tutorials/hello-tye/postgres.yaml

44 строки
930 B
YAML

kind: Deployment
apiVersion: apps/v1
metadata:
name: postgres
labels:
app.kubernetes.io/name: postgres
app.kubernetes.io/part-of: microservice
spec:
selector:
matchLabels:
app.kubernetes.io/name: postgres
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/name: postgres
app.kubernetes.io/part-of: microservice
spec:
containers:
- name: postgres
image: postgres
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_PASSWORD
value: pass@word1
---
apiVersion: v1
kind: Service
metadata:
name: postgres
labels:
app.kubernetes.io/name: postgres
app.kubernetes.io/part-of: microservice
spec:
ports:
- port: 5432
targetPort: 5432
selector:
app.kubernetes.io/name: postgres