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:
kubectl apply -f https://bit.ly/ kong-ingressNow my container status is still init. I want debug init container. So I used:
kubectl get pods -o=name --all-namespaces | grep kongResponse:
pod/ingress-kong-6b6b4c4f5-lg6tp
pod/kong-migrations-grvphNext I using command:
kubectl logs pod/ingress-kong-6b6b4c4f5-lg6tp -c init-container-nameBut I get:
Error from server (NotFound): pods "ingress-kong-6b6b4c4f5-lg6tp" not foundI dont know why I get this error. Please help me. Thanks in advance
If you look at the raw file on that URL you will notice that the deployments and as a result pods are in namespace kong
namespace: kongThe namespaces are used to logically isolate resources within a cluster and you can read more here
Now for your log command to work, you will have to add a namespace flag like this:
kubectl logs -n kong pod/ingress-kong-6b6b4c4f5-lg6tp -c init-container-nameNotice the -n kong in the logs command, and hopefully it should work