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
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSJTBP","label":"IBM Cloud Kubernetes Service and Red Hat OpenShift on IBM Cloud"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB21","label":"Public Cloud Platform"}}]
Was this topic helpful?
Document Information
Modified date:
01 August 2019
UID
ibm1KB0011042