Hi , I am giving mock3 ,I am stuck with np-test-1 pod having issue . I am not a . . .

Deepu:
Hi , I am giving mock3 ,I am stuck with np-test-1 pod having issue . I am not able to connect with service even I created new network policy

Mohamed Ayman:
If you’re talking about question5, check this:
Port 53 is used to be able to reach the service using a service name instead of IP.

apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: NetworkPolicy
metadata:
  name: ingress-to-nptest
  namespace: default
spec:
  podSelector:
    matchLabels:
      run: np-test-1
  policyTypes:
  - Ingress
  ingress:
  - from:
    - podSelector: {}
    ports:
    - protocol: TCP
      port: 80
 
  - ports:
    - protocol: TCP
      port: 53
    - protocol: UDP
      port: 53