<p>I have setup the Kubernetes cluster in my cloud. When it setup complete I install kong-ingress-controller in my master node. I'm using:</p>

<pre><code>kubectl apply -f https://bit.ly/ kong-ingress
</code></pre>

<p>Now my container status is still init. I want debug init container. So I used:</p>

<pre><code> kubectl get pods -o=name --all-namespaces | grep kong
</code></pre>

<p>Response:</p>

<pre><code>pod/ingress-kong-6b6b4c4f5-lg6tp
pod/kong-migrations-grvph
</code></pre>

<p>Next I using command:</p>

<pre><code>kubectl logs pod/ingress-kong-6b6b4c4f5-lg6tp -c init-container-name
</code></pre>

<p>But I get:</p>

<pre><code>Error from server (NotFound): pods "ingress-kong-6b6b4c4f5-lg6tp" not found
</code></pre>

<p>I dont know why I get this error. Please help me. Thanks in advance</p>

Akashii
<p>If you look at the raw file on <a href="https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-postgres.yaml" rel="nofollow noreferrer">that URL</a> you will notice that the deployments and as a result pods are in namespace kong</p>

<pre><code>  namespace: kong
</code></pre>

<p>The namespaces are used to logically isolate resources within a cluster and you can read <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/" rel="nofollow noreferrer">more here</a></p>

<p>Now for your log command to work, you will have to add a namespace flag like this:</p>

<pre><code>kubectl logs -n kong pod/ingress-kong-6b6b4c4f5-lg6tp -c init-container-name
</code></pre>

<p>Notice the <code>-n kong</code> in the logs command, and hopefully it should work</p>
