After creating a new GKE cluster, you run kubectl config get-contexts. What does the output show?
Think about what kubectl config get-contexts shows in general.
The command kubectl config get-contexts lists all contexts in your kubeconfig file, including the new GKE cluster context after configuration.
What happens when you run gcloud container clusters get-credentials my-cluster --zone us-central1-a --project my-project?
Consider what the command name suggests about credentials and configuration.
This command fetches cluster credentials and updates your local kubeconfig so kubectl can communicate with the GKE cluster.
You share your kubeconfig file with a colleague. What is a potential security risk of this action?
Think about what credentials and permissions kubeconfig files hold.
Kubeconfig files contain credentials and tokens that allow full access to the cluster as per your permissions, so sharing them can lead to unauthorized access.
Which component does kubectl communicate with directly to manage resources in a GKE cluster?
Consider what kubectl commands like kubectl get pods interact with.
Kubectl sends requests to the Kubernetes API server, which manages the cluster state and resources.
You manage multiple GKE clusters across projects and regions. What is the best practice to avoid confusion when switching between clusters using kubectl?
Think about how kubectl manages multiple cluster connections.
Using clear context names and switching contexts explicitly helps avoid mistakes and keeps your workflow organized.