I have started to implement NSPs for a project. We currently have the following NSPs defined as stated below. Next to a default deny all NSP.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: kubectl-policy
namespace: ns-where-the-pod-lives
spec:
podSelector:
matchLabels:
app: virtualdesktop
policyTypes:
- Ingress
- Egress
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector: {}
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: default
podSelector: {}
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: ns-where-the-pod-lives
podSelector: {}
egress:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector: {}
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: ns-where-the-pod-lives
podSelector: {}
But i cannot reach the control plane from a pod unless I provide an NSP which allows for using 0.0.0.0 (internet). What NSP do I need to allow the pod to reach EKS K8S control plane internally?