apiVersion: v1 kind: Service metadata: name: main-db namespace: online-back spec: selector: app: main-db ports: - port: 5432 targetPort: 5432