Kubernetes Pod can’t ping to any public IP and even 8.8.8.8 (not able to connect to out side word)

From my kubernetes pod i can’t ping to outside world like google.com 8.8.8.8

Inside the pod
image

Cluster information:

Kubernetes version: 1.20.7
Cloud being used: Azure cloud (AKS)
Installation method: Manual
Host OS: Linux

core-dns logs

[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
.:53
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[INFO] plugin/reload: Running configuration MD5 = 4e7f750cf4402edf0f7938d65477a341
CoreDNS-1.8.3
linux/amd64, go1.16, 4293992b
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server
[WARNING] No files matching import glob pattern: custom/.override
[WARNING] No files matching import glob pattern: custom/
.server

I’m not clear on if you’re manually installing Kubernetes on Azure servers or if you’re actually using AKS. Could you clarify on this?

Also what CNI are you using?

Thanks for the reply . From the azure portal i configured aks manually via GUI and am using AZURE-CNI
Network plugin

Does Azure have similar concepts to AWS where you have to setup the cloud network with things like internet gateways?

Yes , The network has Internet gateway attached and By the way from the Both worker node i can access internet but i can’t access internet from pod .
Is it possible to connect via zoom ?
my email id : balakrishna222111@gmail.com feel free to drop an email

So what comes to mind from what you’ve mentioned so far is NetworkPolicies

I wonder if AKS has any default policies in place. You can check with:

kubectl get networkpolicies -A

I also checked out the Azure CNI documentation. If you manually installed the CNI yourself and didn’t use any automation, they mention that you have to setup a masquerade rule. You can check the iptables rules on each node with:

iptables -n -L

While I’m happy to throw out some ideas here, I don’t have the availability to help out in a direct capacity over zoom. Please don’t let that discourage you from seeking further help.

I resolved it , it was issue with my dns