Install Kubernetes in Public Cloud¶
GKE¶
1 | CLUSTER_NAME=[...] # Change to a random name (e.g., your user) |
1 | gcloud auth login |
1 2 3 4 5 6 7 8 | gcloud container clusters \ create $CLUSTER_NAME \ --region us-east1 \ --machine-type n1-standard-1 \ --enable-autoscaling \ --num-nodes 1 \ --max-nodes 3 \ --min-nodes 1 |
1 2 3 4 | kubectl create clusterrolebinding \ cluster-admin-binding \ --clusterrole cluster-admin \ --user $(gcloud config get-value account) |
1 | kubectl get nodes -o wide |
1 2 3 4 | gcloud container clusters \ delete $CLUSTER_NAME \ --region us-east1 \ --quiet |