Before using kubectl on a GKE cluster, fetch credentials: gcloud container clusters get-credentials my-cluster --region=us-central1. This writes an entry to your kubeconfig so that kubectl talks to that cluster's API server using your Google identity. Access inside the cluster is controlled by IAM roles such as Kubernetes Engine Developer, and optionally Kubernetes RBAC.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 4 more sections, 4 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.