Kubernetes Engine: Qwik Start

LAB 5

Overview

Google Kubernetes Enginearrow-up-right (GKE) provides a managed environment for deploying, managing, and scaling your containerized applications using Google infrastructure. The Kubernetes Engine environment consists of multiple machines (specifically Compute Enginearrow-up-right instances) grouped to form a container clusterarrow-up-right. In this lab, you get hands-on practice with container creation and application deployment with GKE.

Lab

Set a default compute zone

Select your zonearrow-up-right wisely! Enter the following command to set your zone!

gcloud config set compute/zone asia-southeast1-a

Creating a GKE Cluster

A clusterarrow-up-right consists of at least one cluster master machine and multiple worker machines called nodes. Nodes are Compute Engine virtual machine (VM) instancesarrow-up-right that run the Kubernetes processes necessary to make them part of the cluster.

Enter the following command to create a cluster.

Get authentication credentials for the cluster

Deploy an application to the cluster

Deploying a test application as shown below.

Creating a Kubernetes Service which lets us expose our application to external traffic:

  • --port specifies the port that the container exposes.

  • type="LoadBalancer" creates a Compute Engine load balancer for your container.

Inspect Service as shown below to get the public IP:

Deleting the cluster

Last updated

Was this helpful?