apiVersion: v1 kind: Service metadata: name: db spec: type: ClusterIP selector: app: db ports: - port: 5432 targetPort: 5432