Kubernetes
Easy
Commands
Which kubectl command would you use to view the current context?
Select your answer:
Show answer and explanation
Answer: kubectl config current-context
Explanation
The 'kubectl config current-context' command displays the current context, which determines which cluster kubectl communicates with. This is useful when working with multiple clusters.
More easy Kubernetes questions
- What is the purpose of the 'kubectl exec' command?
- After maintenance on a drained Kubernetes node, which command lets the scheduler place new pods on it again?
- A Kubernetes container shows reason OOMKilled with exit code 137. What does the exit code 137 tell you?
- A container restarted after an out-of-memory kill. Which field of the Kubernetes pod status records that the previous run was OOMKilled?
- A container writes files to an emptyDir volume with medium: Memory. What do those files count against?
- Which command shows when each certificate in a kubeadm cluster's control plane PKI expires?