# Allows outgoing traffic to the gardener-apiserver.
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: to-gardener-apiserver
  namespace: (( landscape.namespace ))
spec:
  podSelector:
    matchLabels:
      networking.gardener.cloud/to-gardener-apiserver: allowed
  policyTypes:
  - Egress
  egress:
  - to:
    - podSelector:
        matchLabels:
          app: gardener
          role: apiserver