Newbie here. I have a nginx pod in namespace isolation, which is accessible only by a namespace with label env:test which apparently is the test namespace. Here is my .yaml:
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: allow-different-namespace-policy
namespace: isolation
spec:
podSelector:
matchLabels:
app: nginx
ingress:
- from:
- namespaceSelector:
matchLabels:
env: test
So what happens if my pod dies? I guess kube-node-lease namespace won't have access to my pod, so if anything bad happens it won't be restarted. What is considered best practice to grant access? Labeling is an option, but is there something else I can do?