# postgres-deployment.yaml 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:16-alpine ports: - containerPort: 5432 envFrom: - configMapRef: name: kaneo-env volumeMounts: - name: postgres-data mountPath: /var/lib/postgresql/data readinessProbe: exec: command: - sh - -c - pg_isready -U kaneo -d kaneo initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 5 livenessProbe: exec: command: - sh - -c - pg_isready -U kaneo -d kaneo initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 5 volumes: - name: postgres-data persistentVolumeClaim: claimName: postgres-data --- apiVersion: v1 kind: Service metadata: name: postgres spec: type: ClusterIP selector: app: postgres ports: - port: 5432 targetPort: 5432