Unable to connect to Internet from a container deployed in Kubernetes

4,690 views
Skip to first unread message

Gopi

unread,
Oct 14, 2016, 2:15:27 AM10/14/16
to Kubernetes user discussion and Q&A
Hi,

I face an issue after deploying an application to Kubernetes that I am not able to access anything over the Internet from "inside the container". But, I am able to do that from the node on which the pod is running. In other words, I am able to pull the images from Dockerhub, but when I "exec" into the container, I cannot ping any external IPs.

Cloud Provider: AWS

The first suggestion I got is to check the iptables, but I couldn't debug it (see above gist) as I am not an expert in understanding the iptables output.

Any help would be appreciated.

Thank you.

Gopi

unread,
Oct 14, 2016, 11:10:13 PM10/14/16
to Kubernetes user discussion and Q&A
Update: I am able to ping external IP addresses from the container, but the external hostnames are not being resolved. So, the problem could be with my "kube-dns" setup.

/etc/resolv.conf (container and the node):

Gopi

unread,
Oct 15, 2016, 1:26:17 AM10/15/16
to Kubernetes user discussion and Q&A
Getting help in the Kubernetes-users slack channel. Thank you.

as...@bizible.com

unread,
Mar 11, 2017, 7:25:30 PM3/11/17
to Kubernetes user discussion and Q&A
On Friday, October 14, 2016 at 10:26:17 PM UTC-7, Gopi wrote:
> Getting help in the Kubernetes-users slack channel. Thank you.

How did you fix this? I am hitting the same issue. My app running is container is not able to reach internet.

Thanks.

Ahmet Alp Balkan

unread,
Mar 13, 2017, 1:15:19 PM3/13/17
to kubernet...@googlegroups.com
Please point out what environment you are using (or how did you set up your cluster). Depending on a combination of your installation method, cloud provider or networking/firewall/routes configuration you can end up with this.


--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Ashok Shivani

unread,
Mar 13, 2017, 1:52:53 PM3/13/17
to kubernet...@googlegroups.com
Hi -

I am using Azure Container Service with Kubernetes. 
I followed the instructions in this document to set up the Resource Group & Set up the Kubernetes: https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-windows-walkthrough  .
After that, I used the portal from this document to deploy my container : https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-ui 

I am running a .NET4.5 application on Windows container. My app is trying to ping google.com and it is not able to reach internet. It is working fine when I run it on docker in my machine. 

Thanks,




On Mon, Mar 13, 2017 at 10:14 AM, 'Ahmet Alp Balkan' via Kubernetes user discussion and Q&A <kubernet...@googlegroups.com> wrote:
Please point out what environment you are using (or how did you set up your cluster). Depending on a combination of your installation method, cloud provider or networking/firewall/routes configuration you can end up with this.

On Sat, Mar 11, 2017 at 4:25 PM, ashok via Kubernetes user discussion and Q&A <kubernetes-users@googlegroups.com> wrote:
On Friday, October 14, 2016 at 10:26:17 PM UTC-7, Gopi wrote:
> Getting help in the Kubernetes-users slack channel. Thank you.

How did you fix this? I am hitting the same issue. My app running is container is not able to reach internet.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.

To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/pyp5cy4hLww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-users+unsubscribe@googlegroups.com.

woodw...@gmail.com

unread,
Apr 19, 2017, 4:41:05 PM4/19/17
to Kubernetes user discussion and Q&A, as...@bizible.com

kuzme...@insart.com

unread,
Jul 4, 2017, 4:20:16 PM7/4/17
to Kubernetes user discussion and Q&A
суббота, 15 октября 2016 г., 8:26:17 UTC+3 пользователь Gopi написал:
> Getting help in the Kubernetes-users slack channel. Thank you.

Mr Gopi, could you please share the result of your research on this matter? Sounds like problem you had got resolved. I got here exactly the same problem. Thanks :)
Reply all
Reply to author
Forward
0 new messages