Complete the command to switch the current namespace context in kubectl.
kubectl config set-context --current --namespace=[1]The command sets the current context's namespace to the specified one, here 'production'.
Complete the command to view the current namespace in kubectl context.
kubectl config view --minify [1]This command extracts the current namespace from the kubectl config using jsonpath.
Fix the error in the command to switch namespace context.
kubectl config set-context [1] --namespace=stagingThe correct flag to modify the current context is '--current'.
Fill both blanks to create a command that switches to the 'dev' namespace and then lists pods.
kubectl config set-context [1] --namespace=[2] && kubectl get pods
Use '--current' to modify the current context and 'dev' as the namespace name.
Fill all three blanks to create a dictionary comprehension that maps pod names to their statuses for pods in the current namespace.
pods_status = { [1]: [2].status.phase for [3] in pods.items() }The dictionary comprehension {pod.metadata.name: pod.status.phase for pod in pods.items()} maps pod names to their status phases.