A team is investigating sporadic authentication failures in their multi-namespace GKE cluster. They want a quick CLI snapshot of every Pod that is currently restarting, regardless of the namespace where it is running. Which kubectl flag should they add to kubectl get pods so the command returns Pods from every namespace in one consolidated list?
Run the command without any flag while the current context is set to kube-system.
The -A (or long form --all-namespaces) flag tells kubectl to query resources across every namespace instead of the default namespace. Adding this flag to kubectl get pods lets administrators view the full cluster inventory-including Pods restarting in any namespace-in a single command. The other options either target only one namespace, are not valid kubectl flags, or depend on the current context rather than forcing a cluster-wide listing.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a GKE cluster?
Open an interactive chat with Bash
What does the `-A` flag in kubectl do?
Open an interactive chat with Bash
What is a Kubernetes namespace?
Open an interactive chat with Bash
What does the `-A` flag do in kubectl commands?
Open an interactive chat with Bash
What is a namespace in Kubernetes?
Open an interactive chat with Bash
How can you query a specific namespace with kubectl?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .