3.2.1 Creating a cluster
View in the book.
Buy the book.
Create Cluster
Create an Autopilot cluster in the UI
or via CLI:
CLUSTER_NAME=my-cluster
REGION=us-west1
gcloud container clusters create-auto $CLUSTER_NAME --region $REGION
Authenticate to the cluster
Copy the cluster connection command from the UI
Or CLI:
gcloud container clusters get-credentials $CLUSTER_NAME --region $REGION
Test your connection:
$ kubectl get pods
No resources found in default namespace.
Other Environments
If you’re not using Cloud Shell, you’ll need to configure gcloud
.
Download gcloud: https://cloud.google.com/sdk/install
gcloud init
gcloud components install kubectl