Troubleshooting
Problem
Why doesn't Kubernetes list the pods?
Resolving The Problem
What';s Happening
You cannot list the required pods using the kubectl get pods command.
Why it';s Happening
By default, when a namespace is not specified, the pods in the default namespace are returned by the kubectl get pods command. However, if nothing is deployed here, the command cannot return any results.
How to Fix
You can add the --all-namespaces parameter to display all of the pods across all namespaces or -n namespace to target a specific namespace. For example: kubectl get pods --all-namespaces
Document Location
Worldwide
Was this topic helpful?
Document Information
More support for:
IBM Cloud Kubernetes Service and Red Hat OpenShift on IBM Cloud
Software version:
All Versions
Document number:
963506
Modified date:
01 August 2019
UID
ibm1KB0011042