Comment on page
Kubernetes Engine: Qwik Start
Google Kubernetes Engine (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 Engine instances) grouped to form a container cluster. In this lab, you get hands-on practice with container creation and application deployment with GKE.
gcloud config set compute/zone asia-southeast1-a
Enter the following command to create a cluster.
gcloud container clusters create neeishere
gcloud container clusters get-credentials [CLUSTER-NAME]
Deploying a test application as shown below.
kubectl create deployment hello-server --image=gcr.io/google-samples/hello-app:1.0
Creating a Kubernetes Service which lets us expose our application to external traffic:
kubectl expose deployment hello-server --type=LoadBalancer --port 8080
--portspecifies 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:
kubectl get service
gcloud container clusters delete neeishere