apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: auth-server-migrate-egress-postgres labels: app.kubernetes.io/name: auth-server app.kubernetes.io/instance: auth-server-migrate-0-1-0 app.kubernetes.io/component: migration app.kubernetes.io/part-of: auth-platform app.kubernetes.io/managed-by: kustomize spec: podSelector: matchLabels: app.kubernetes.io/name: auth-server app.kubernetes.io/instance: auth-server-migrate-0-1-0 policyTypes: - Egress egress: - to: - podSelector: matchLabels: app.kubernetes.io/name: identity-postgres app.kubernetes.io/instance: identity-postgres ports: - protocol: TCP port: 5432