Kubernetes Engine: Qwik Start
๐ link
Overview
What is Google Kubernetes Engine(GKE)
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.
Benefit of Kubernetes on Google Cloud
Load balancing for Compute Engine instances
Node pools to designate subsets of nodes within a cluster for additional flexibility
Automatic scaling of your cluster's node instance count
Automatic upgrades for your cluster's node software
Node auto-repair to maintain node health and availability
Logging and Monitoring with Cloud Monitoring for visibility into your cluster
Task 1. Set a default compute zone
gcloud config set compute/zone us-central1-a
Task 2. Create a GKE cluster
gcloud container clusters create [CLUSTER-NAME]
Task 3. Get authentication credentials for the cluster
gcloud container clusters get-credentials [CLUSTER-NAME]
Task 4. Deploy an application to the cluster
Provides declarative updates for Pods and ReplicaSets.
Abstrac way to expose an application running on a set of Pods as a network service.
โ๏ธ Create a new Deployment
kubectl create deployment hello-server --image=gcr.io/google-samples/hello-app:1.0
โ๏ธ Create a Kubernetes Service
kubectl expose deployment hello-server --type=LoadBalancer --port 8080
โ๏ธ Inspect the Service
kubectl get service
โ๏ธ View the application from your web browser, open a new tab and enter the following address.
http://[EXTERNAL-IP]:8080
Task 5. Deleting the cluster
gcloud container clusters delete [CLUSTER-NAME]
Summary
Get hands-on practice with container creation and application deployment with GKE.
Last updated