<p>Pod hosted on K8s cluster is not able to connect to the internet:</p>
<pre><code>[root@master micro-services]# kubectl exec -it webapp-77896f4bf8-8ptbb  -- ping google.com
ping: bad address 'google.com'
command terminated with exit code 1
</code></pre>

armaan mahajan
<p>You can check the name servers by opening <code>resolv.conf</code> in your container's directory:</p>
<pre><code>/etc/resolv.conf
</code></pre>
<p>You can test by adding Google's public name server like:</p>
<pre><code>nameserver 8.8.8.8
</code></pre>
<p>Should resolve internet issue by adding above line to <code>/etc/resolv.conf</code>.</p>
<p>A better way is to use Kubernetes's own core DNS as described <a href="https://blog.yaakov.online/kubernetes-getting-pods-to-talk-to-the-internet/" rel="nofollow noreferrer">here</a>.</p>
