GCP – Introducing GKE Autopilot


It’s no secret the huge revolution that Kubernetes has ignited for the Industry since Google introduced it back in 2014, so I’d guess we don’t need to go there.

The GCP offering for Kubernetes is GKE, which provides a fully managed environment for orchestrating and deploying containers in the cloud.

Image property of gcp.com

GKE now is offering two operation modes:

The Standard operation mode is managed, but the infrastructure is configured and handled by the customer: needs configuration for scaling and node provisioning – provides a lot of flexibility.

Image captured from the console by the author

Autopilot mode has been introduced to provide a full and streamlined NoOps experience: GKE fully manages the infrastructure. The nodes provisioning and the scaling are automatically handled for you – no more worries about the master and working nodes. You’d lose some flexibility, though, but that’s the usual compromise.

Autopilot Cluster – Image property gcp.com

Creating a cluster with Autopilot

Image captured from the console by the author

I initially created a cluster in europe-north-1, but I got some problems deploying the pods to the cluster, so I changed it to usa-north, and it worked – guess some region limitations at the moment some transient problems.

Image captured from the console by the author

The cluster has been created, now we need to deploy some pods – Image captured from the console by the author

After creating the cluster, I deployed a basic web container with a web service but no node configuration, which speeds and simplifies the provisioning.

Per the documentation, Autopilot applies the following values for the pod’s resources:

Finally, I created a service to expose the endpoint to the world. I selected the balancer type because Autopilot doesn’t allow ExternalIps; alternatively, you could use an Ingress service.

Working cluster, 3 nodes + balancer – Image captured from the console by the author

And that’s all; our web app is ready. Autopilot provisioned automatically three nodes using e2-medium machines. After invoking the service a few times, the allocated resources were low, as shown in the image above.

I need to do load testing – and cost calculation – with a complex application and see how the autoscaling behaves. But my initial impression it’s excellent: it can’t be easier to provision a Kubernetes cluster. Read more about it in the GCP’S blog.