apiVersion: v1 kind: Service metadata: name: postgres labels: app: postgres spec: type: ClusterIP selector: app: postgres ports: - port: 5432 targetPort: 5432 protocol: TCP