Complete the code to list all contexts in your kubeconfig file.
kubectl config get-contexts [1]The --no-headers option lists contexts without headers, showing all available contexts clearly.
Complete the command to switch to a specific cluster context named 'cluster-2'.
kubectl config [1] cluster-2
The use-context command switches your kubectl to the specified cluster context.
Fix the error in the command to apply a deployment to a specific cluster context.
kubectl --context=[1] apply -f deployment.yamlThe --context flag requires the exact context name from your kubeconfig, such as 'context1'.
Fill in the blank to create a kubeconfig file that merges two cluster configs.
kubectl config [1] --kubeconfig=config1.yaml --kubeconfig=config2.yaml --flatten > merged-config.yamlThe view command merges multiple kubeconfigs specified via repeated --kubeconfig flags (later files override earlier), and with --flatten outputs a flat config to stdout, redirected to create the merged file.
Fill all three blanks to create a context named 'prod' for cluster 'cluster-prod' with user 'admin'.
kubectl config [1] prod --cluster=[2] --user=[3]
The set-context command creates or modifies a context. You specify the cluster and user names accordingly.