0

Recently I have created private AKS via Terraform, every thing went OK, how is it possible that two pods within the same namespace are unable to communicate with each other?

AKS version= 1.19.11 coredns:1.6.6

# kubectl get svc
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.0.0.1     <none>        443/TCP   5d18h

Cluster has been created with below resources:

Network type (plugin)=Kubenet
Pod CIDR=10.x.x.x/16
Service CIDR=10.x.x.0/16
DNS service IP=10.x.x.10
Docker bridge CIDR=172.x.x.1/16
Network Policy=Calico

Ping response:

/ # ping 10.x.x.89
PING 10.x.x.89 (10.x.x.89): 56 data bytes
^C
--- 10.x.x.89 ping statistics ---
25 packets transmitted, 0 packets received, 100% packet loss
/ # ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: seq=0 ttl=241 time=27.840 ms
64 bytes from 10.0.0.1: seq=1 ttl=241 time=28.790 ms
64 bytes from 10.0.0.1: seq=2 ttl=241 time=28.725 ms
^C
--- 10.0.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 27.840/28.451/28.790 ms
/ # ping kubernetes
ping: bad address 'kubernetes'
/ # nslookup kubernetes
nslookup: can't resolve '(null)': Name does not resolve

nslookup: can't resolve 'kubernetes': Name does not resolve
/ # 
Bazhikov
  • 765
  • 3
  • 11
Satyam Pandey
  • 593
  • 2
  • 10
  • 32
  • Can you please check if the traffic is impacted between pods on the same node only (if so, is there specific node(s) impacted?) or between pods on different nodes only or between any two pods, irrespective of the node on which they are scheduled? This should also give a hint at the traffic from your pod to the coredns pods. – Srijit_Bose-MSFT Sep 28 '21 at 13:34
  • Have you added network policies already? If so what are those? – Srijit_Bose-MSFT Sep 28 '21 at 13:44

1 Answers1

0

Network policy was the issue Kubectl get netpol -n namespace

Satyam Pandey
  • 593
  • 2
  • 10
  • 32