Deploy Kubernetes WebApp in Google Kubernetes Engine Cluster
This tutorial shows you how to package a web application in a Docker container image, and run that container image on a Google Kubernetes Engine (GKE) cluster. You will deploy the web application as a load-balanced set of replicas that can scale to the needs of your users. Join WhatsApp: https://www.whatsapp.com/channel/0029Va8fH154IBhEu3t21y2o ?Get CloudWays ➜ https://www.cloudways.com/en/?id=1365224 ?CloudWays COUPON CODE: CLOUDGURU25 ☝️☝️ USE THE EXCLUSIVE COUPON CODE ABOVE TO GET 25% OFF FOR 3 MONTHS? ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Medium Link: https://cloudgurupayments.medium.com/deploy-kubernetes-web-application-in-gke-cluster-using-docker-1caa05a08d78 Below topics covered in this video: - Introduction - Why do we need Kubernetes? - What is GKE? - How to create a GKE cluster - Standard vs auto-pilot GKE cluster - What is a node pool in GKE? - Cluster autoscaling in GKE - Vertical and horizontal pod autoscaling in GKE - Node auto-repair vs node auto-upgrade - How to interact with the GKE cluster - How to deploy a simple application to GKE - How to set default cluster in GKE - gkectl vs kubectl commands - knowledge checks for the associate cloud engineer certification exam. Part - 1: ======= Create a sample website using docker container docker run -p 8080:80 nginx:latest docker cp index.html [container-id]:/usr/share/nginx/html/ docker commit [container-id] cad/web:version1 docker tag cad/web:version1 us.gcr.io/youtube-demo-255723/cad-site:version1 docker push us.gcr.io/youtube-demo-255723/cad-site:version1 PART - 2 ======= Deploying container in GKE cluster gcloud config set project youtube-demo-255723 gcloud config set compute/zone us-central1-a Creating a GKE cluster gcloud container clusters create gk-cluster --num-nodes=1 gcloud container clusters get-credentials gk-cluster This command configures kubectl to use the cluster you created. Deploying an application to the cluster kubectl create deployment web-server --image=us.gcr.io/youtube-demo-255723/cad-site:version1 Exposing the Deployment kubectl expose deployment web-server --type LoadBalancer --port 80 --target-port 80 Inspecting and viewing the application 1. Inspect the running Pods by using kubectl get pods 2. Inspect the hello-server Service by using kubectl get service #kubernetes #gke #googlecloud #googlekubernetesengine #googlecloudplatform
This tutorial shows you how to package a web application in a Docker container image, and run that container image on a Google Kubernetes Engine (GKE) cluster. You will deploy the web application as a load-balanced set of replicas that can scale to the needs of your users. Join WhatsApp: https://www.whatsapp.com/channel/0029Va8fH154IBhEu3t21y2o ?Get CloudWays ➜ https://www.cloudways.com/en/?id=1365224 ?CloudWays COUPON CODE: CLOUDGURU25 ☝️☝️ USE THE EXCLUSIVE COUPON CODE ABOVE TO GET 25% OFF FOR 3 MONTHS? ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Medium Link: https://cloudgurupayments.medium.com/deploy-kubernetes-web-application-in-gke-cluster-using-docker-1caa05a08d78 Below topics covered in this video: - Introduction - Why do we need Kubernetes? - What is GKE? - How to create a GKE cluster - Standard vs auto-pilot GKE cluster - What is a node pool in GKE? - Cluster autoscaling in GKE - Vertical and horizontal pod autoscaling in GKE - Node auto-repair vs node auto-upgrade - How to interact with the GKE cluster - How to deploy a simple application to GKE - How to set default cluster in GKE - gkectl vs kubectl commands - knowledge checks for the associate cloud engineer certification exam. Part - 1: ======= Create a sample website using docker container docker run -p 8080:80 nginx:latest docker cp index.html [container-id]:/usr/share/nginx/html/ docker commit [container-id] cad/web:version1 docker tag cad/web:version1 us.gcr.io/youtube-demo-255723/cad-site:version1 docker push us.gcr.io/youtube-demo-255723/cad-site:version1 PART - 2 ======= Deploying container in GKE cluster gcloud config set project youtube-demo-255723 gcloud config set compute/zone us-central1-a Creating a GKE cluster gcloud container clusters create gk-cluster --num-nodes=1 gcloud container clusters get-credentials gk-cluster This command configures kubectl to use the cluster you created. Deploying an application to the cluster kubectl create deployment web-server --image=us.gcr.io/youtube-demo-255723/cad-site:version1 Exposing the Deployment kubectl expose deployment web-server --type LoadBalancer --port 80 --target-port 80 Inspecting and viewing the application 1. Inspect the running Pods by using kubectl get pods 2. Inspect the hello-server Service by using kubectl get service #kubernetes #gke #googlecloud #googlekubernetesengine #googlecloudplatform