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