Войти
  • 65109Просмотров
  • 5 лет назадОпубликованоCloud Advocate

Google Kubernetes Engine: Create GKE Cluster and Deploy Sample Website!!

You will learn some basic docker commands. Create docker image and publish the image to docker container registry. Finally deploy the sample website to Google Kubernetes Engine cluster. #gke #gkecluster Part - 1: ======= Create a sample website using docker container docker run -p 8080:80 nginx:latest docker cp [container-id]:/usr/share/nginx/html/ docker commit [container-id] cad/web:version1 docker tag cad/web:version1 :version1 docker push :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= :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 Sources: • • • • ---------- PLEASE SUBSCRIBE ➡️ ❤️ If you like my work considering buying me a COFFEE: ---------- PLAYLISTS: - Associate Cloud Engineer Study Guide: - Google Cloud Playlist: ---------- - Questions? Thoughts? Disagreements? Tell us here in the comments. ---------- LETS CONNECT: 👍 Facebook: 📸 Instagram - 🐦 Twitter -