i have created a network policy name allow-from-namespace in existing namespace echo,so that this network policy allow pod in namespace my-app to connect to port 9000 of pods in namespace echo
here is my yaml :
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-namespace
namespace: echo
spec:
podSelector:
matchLabels:
policyTypes:
- Ingress
ingress: - from:
- podSelector:
ports: - protocol: TCP
port: 9000
- podSelector:
after i have run kubectl apply -f 2.yaml , found below error.can anyone please help me.