Learn how to easily spin up a Kubernetes Cluster on Google Cloud Platform.

Google Kubernetes Engine is a powerful cluster manager and orchestration system for running your Docker containers.

Create a new cluster via gcloud cli

gcloud container clusters create [CLUSTER_NAME]

Setup gcloud cli

$ gcloud container clusters list
$ gcloud container clusters get-credentials 

Give yourself cluster admin role

kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud info | grep Account | cut -d '[' -f 2 | cut -d ']' -f 1)

Run a test kubectl command

$ kubectl get node

NAME                                 STATUS    ROLES     AGE       VERSION
gke-cluster-1-pool-1-784963d2-7nmb   Ready     <none>    2h        v1.10.7-gke.2
gke-cluster-1-pool-1-784963d2-82zn   Ready     <none>    2h        v1.10.7-gke.2
gke-cluster-1-pool-1-784963d2-9t45   Ready     <none>    14h       v1.10.7-gke.2
gke-cluster-1-pool-1-784963d2-bc4f   Ready     <none>    2h        v1.10.7-gke.2
gke-cluster-1-pool-1-784963d2-ftg2   Ready     <none>    15h       v1.10.7-gke.2
gke-cluster-1-pool-1-784963d2-gz1p   Ready     <none>    15h       v1.10.7-gke.2
gke-cluster-1-pool-1-784963d2-jn1c   Ready     <none>    15h       v1.10.7-gke.2
gke-cluster-1-pool-1-784963d2-jwb0   Ready     <none>    2h        v1.10.7-gke.2
gke-cluster-1-pool-1-784963d2-x7xz   Ready     <none>    14h       v1.10.7-gke.2

Now that your cluster is up and running how about we Deploy Highly Available WordPress!

See Also: