<p>I have the following questions:</p>
<ol>
<li><p>I am logged into a Kubernetes pod using the following command:</p>
<pre><code> ./cluster/kubectl.sh exec my-nginx-0onux -c my-nginx -it bash
</code></pre>
<p>The 'ip addr show' command shows its assigned the ip of the pod. Since pod is a logical concept, I am assuming I am logged into a docker container and not a pod, In which case, the pod IP is same as docker container IP. Is that understanding correct?</p>
</li>
<li><p>from a Kubernetes node, I do <code>sudo docker ps</code> and then do the following:-</p>
<pre><code> sudo docker exec  71721cb14283 -it '/bin/bash'
</code></pre>
<p>This doesn't work. Does someone know what I am doing wrong?</p>
</li>
<li><p>I want to access the nginx service I created, from within the pod using curl. How can I install curl within this pod or container to access the service from inside. I want to do this to understand the network connectivity.</p>
</li>
</ol>

<p>Here is how you get a curl command line within a kubernetes network to test and explore your internal REST endpoints.</p>
<p>To get a prompt of a busybox running inside the network, execute the following command. (A tip is to use one unique container per developer.)</p>
<pre class="lang-bash prettyprint-override"><code>kubectl run curl-&lt;YOUR NAME&gt; --image=radial/busyboxplus:curl -i --tty --rm
</code></pre>
<p>You may omit the --rm and keep the instance running for later re-usage. To reuse it later, type:</p>
<pre class="lang-bash prettyprint-override"><code>kubectl attach &lt;POD ID&gt; -c curl-&lt;YOUR NAME&gt; -i -t
</code></pre>
<p>Using the command <code>kubectl get pods</code> you can see all running POD's. The <code>&lt;POD ID&gt;</code> is something similar to <code>curl-yourname-944940652-fvj28</code>.</p>
<p><strong>EDIT:</strong> Note that you need to login to google cloud from your terminal (once) before you can do this! Here is an example, make sure to put in your zone, cluster and project:</p>
<pre class="lang-bash prettyprint-override"><code>gcloud container clusters get-credentials example-cluster --zone europe-west1-c --project example-148812
</code></pre>
