Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubectl : No resource found

I’ve installed ICP4Data successfully. I am pretty green in respect to ICP4Data and Kubernetes. I’m trying to use kubectl command for listing the pods in ICP4D but “kubectl get pods” returns “No resource found”. Am I missing something?

like image 597
sidrah junaid Avatar asked Nov 16 '18 20:11

sidrah junaid


People also ask

How do I resolve Imagepullbackoff in Kubernetes?

To resolve it, double check the pod specification and ensure that the repository and image are specified correctly. If this still doesn't work, there may be a network issue preventing access to the container registry. Look in the describe pod text file to obtain the hostname of the Kubernetes node.

How do you set current context in kubectl?

What this says is that you can create or modify contexts in your kubeconfig file with the command kubectl config set-context. This command also accepts the name of the context to be changed (or --current if you want to change the current context), as well as --user, --cluster, and --namespace options.

What are kubectl API resources?

Kubectl API resources list the forms of resources existing in the cluster. Therefore, when used in combination with kubectl get, we can mention each occurrence of all kinds of resources in the Kubernetes namespace. In this code, we would execute the following command by specifying a namespace.


1 Answers

icp4d uses 'zen' namespaces to logically separate its assets and resources from the core native icp/kube platform. In the default installation of ICP4D, there are no pods deployed on 'default' namespace and hence you get "no resources found" cause if you don't provide the namespace while trying to get pods, kubectl assumes its default namespace.

To List the pods from zen namespace

  kubectl get pods -n zen

To list all the namespaces available to you - try

kubectl get namespaces

To list pods from all the namespaces, you might want to append --all-namespaces

kubectl get pods --all-namespaces

This should list all the pods from zen, kubesystem and possibly others.

like image 79
Sachin Prasad Avatar answered Sep 16 '22 11:09

Sachin Prasad