Тёмный

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

Cloud Advocate
Подписаться 155 тыс.
Просмотров 58 тыс.
50% 1

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 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
Sources:
• cloud.google.com/container-re...
• docs.docker.com/engine/refere...
• cloud.google.com/sdk/gcloud/r...
• cloud.google.com/kubernetes-e...
----------
PLEASE SUBSCRIBE ➡️bit.ly/36x6qQy ❤️
If you like my work considering buying me a COFFEE: bit.ly/3lumyqx
----------
PLAYLISTS:
- Associate Cloud Engineer Study Guide: bit.ly/37y1dYl
- Google Cloud Playlist: bit.ly/37uMZal
----------
- Questions? Thoughts? Disagreements? Tell us here in the comments.
----------
LETS CONNECT:
👍 Facebook: / multicloudguy
📸 Instagram - / multicloudguy
🐦 Twitter - / multicloudguy

Наука

Опубликовано:

 

17 мар 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 118   
@reddyajith9508
@reddyajith9508 2 года назад
As expected ...simple and sweet .. Thanks for making our lives easy GK !!
@svJayaram9
@svJayaram9 4 года назад
Yes i am able to deploy the html in the cluster. Thank you for your video
@alexbardelli1
@alexbardelli1 2 года назад
I would like to thank you for all your contents about GCP, you really cleared out my mind about which cloud Provider peruse as first.
@dharmeshpatel8778
@dharmeshpatel8778 3 года назад
Thank you so much! I had been trying to deploy since two days and your video helped me finish my job interview assessment.
@CloudAdvocate
@CloudAdvocate 3 года назад
Glad it helped!
@ramroy5942
@ramroy5942 2 года назад
Your lectures are very Insightfull Kartik....thankyou for enriching us
@santoshkudhale6799
@santoshkudhale6799 4 года назад
Thanks for making this GKE series. Its helpful. 👍🏼
@CloudAdvocate
@CloudAdvocate 4 года назад
Glad it was helpful!
@Bijuthtt
@Bijuthtt 3 года назад
Awesome tutorial. explained in a nice way. Thank you sir
@CloudAdvocate
@CloudAdvocate 3 года назад
You are most welcome
@chandrachoodraveendran6413
@chandrachoodraveendran6413 Год назад
It was an awesome video, great value in short time
@gui250493
@gui250493 3 года назад
Very well done. Thanks very much. You could also build the image out of a Dockerfile, but It was a clear tutorial. Thanks. Please, send more.
@CloudAdvocate
@CloudAdvocate 3 года назад
Thank you!!
@shubhamvishwakarma9233
@shubhamvishwakarma9233 2 года назад
Awesome work !!!
@IRegan
@IRegan Год назад
Thank you so much, I found it interesting and a perfect tutorial man🙏
@shitsonfireyo
@shitsonfireyo Год назад
exactly what I was looking for! thank you!
@mengyuli5711
@mengyuli5711 2 года назад
Your video is awesome.
@monishverma362
@monishverma362 4 года назад
Nice tutorial. I was able to get my spring boot app up and running
@CloudAdvocate
@CloudAdvocate 4 года назад
Great 👍
@gcpchannelforbegineers7080
@gcpchannelforbegineers7080 3 года назад
Simply awesome sir. Here you explain with single node can you please do an video if you created more than 1 nodes so that we've better idea sir.
@janellepablo3922
@janellepablo3922 4 года назад
thank you. this is very helpful.
@adamtechdays
@adamtechdays 3 года назад
This was an excellent video, clarified a lot. Do we need to know the ins and outs of yml file creations for the Google Cloud Associate exam or is this method sufficient?
@subesingh7285
@subesingh7285 4 года назад
Thank you for such a good video!
@CloudAdvocate
@CloudAdvocate 4 года назад
Happy to help!
@scorpiovibration8172
@scorpiovibration8172 3 года назад
Best explanation sir :)
@sidharthaworld
@sidharthaworld 3 года назад
Thanks for sharing awesome video's . Can you share us the same using declarative way instead of adhoc way and what is Ephemeral Containers ?
@RaghavSood19
@RaghavSood19 4 года назад
Helpful thanks
@piyushdarji7926
@piyushdarji7926 3 года назад
Wow ...so helpful sir
@CloudAdvocate
@CloudAdvocate 3 года назад
Glad to hear that
@zohebsiddiqui4975
@zohebsiddiqui4975 3 года назад
Hi GK With the your great help i am following most of your tutorials and able to perform the labs success-fully . Getting good support from the FB group as well. This has created my interest in the cloud even more the way to teach is awesome but just one more thing if you give the back ground of what your are going to do in the lab would help even more to beginners.But still you are amazing. And finally i able to deploy my website in the kubernetes cluster. One more thing do we need to delete the cluster and docker repository to avoid charges please do let me know Thanks.
@CloudAdvocate
@CloudAdvocate 3 года назад
Thank you, yes pls delete the cluster right away.
@douglasharley2440
@douglasharley2440 4 года назад
*great video* ! much thanks
@CloudAdvocate
@CloudAdvocate 4 года назад
You are welcome!
@srinivasrevadi44
@srinivasrevadi44 Год назад
you saved my a**, thanks you, able to do hands on
@verizon2851
@verizon2851 4 года назад
Can we directly deploy an image from dockerhub registry to the GKE cluster?? And also, the video was very informative. Thanks!
@pavangrandhi
@pavangrandhi 3 месяца назад
Thank you 🙏
@prakashannadurai2031
@prakashannadurai2031 Год назад
It's a superb bro and i tried this in my PC and it works. For this site i'm trying to add ingress rule, but stuck up. Is there any video for adding the same.
@moosegoose1282
@moosegoose1282 3 года назад
Hey bro, does GKE set up ssl for you? I see the https on the site. If I deploy a web api it will also have ssl right? I’m planning on deploying 3 separation containers
@user-tu7yt6fn2z
@user-tu7yt6fn2z 5 месяцев назад
Very informative. I tried to create a GKE auto mode cluster with a shared VPC network(private IP range), and assigned necessary IAM roles to the GKE hosted service project with (compute.engineadmin and container.admin roles). While provisioning the gke auto pilot cluster, getting this exception as " Error: Error waiting for creating GKE cluster: All cluster resources were brought up, but: only 0 nodes out of 1 have registered; cluster may be unhealthy." Verified the logs for any key findings, but not helpful. Any thoughts/references on this error scenario to troubleshoot ??
@CSRFVICTIMEmperor
@CSRFVICTIMEmperor 4 месяца назад
Hi, can you create a video about the pricing and the best options to use for large-scale web applications?
@bbhajesh
@bbhajesh 3 года назад
Hey Thanks, Nice one. Do you have any tutorial about how to run GKE from a message from pub/sub subscriber?
@praveshtiwari6449
@praveshtiwari6449 3 года назад
Wonderful video, Good Job (y) I am trying to deploy a software using kubernetes. everything went well ...but when i am trying to access it . it's showing "default backend - 404" in browser.
@abhinavmajumdar7365
@abhinavmajumdar7365 Год назад
From where to study to prepare for k8s certification?
@leandrojpg
@leandrojpg Год назад
if you can make a video with cloudbuild with deploy in gke and using tag automatically by cloudbuildd.
@svJayaram9
@svJayaram9 4 года назад
Hi GK, how are you.. really your video's are so clear and very understandable. I think you can create one GCP course and post it on Udemy. So that we can buy that complete course for ACE. What you say? And one more question is, is there any possibility to share your mail id?
@CloudAdvocate
@CloudAdvocate 4 года назад
Hi Sankar, I am doing well thank you. Yea I wanted to do. Hopefully soon. My email is multicloudguy@gmail.com
@rajkumarmishra4409
@rajkumarmishra4409 Год назад
How can we run script in gke cluster through terraform..?? Please any answer
@ashshah8995
@ashshah8995 3 года назад
how would you then attach a database too it?
@mrjohnchen
@mrjohnchen 2 года назад
Hi there. Thanks for the detailed demo. I faced a problem when I execute "docker cp index.html [container-id]:/usr/share/nginx/html/". The error message: lstat /home/.../index.html: no such file or directory. Which folder should I be in to execute this command?
@matheusmedrado4430
@matheusmedrado4430 2 года назад
i think you should upload some custom html file or create a html file to do that. Because this command just copy a file to the container you need a index.html file to make the command work
@akshayasarangapani9122
@akshayasarangapani9122 4 года назад
Wonderful video! Thank You. I ran docker with nginx . Able to view default nginx webpage. But when I ran tried "docker cp index.html [container-id]:/usr/share/nginx/html/" , it gives the following error "lstat /home/USER/index.html: no such file or directory. Also I don't see index.html on my home directory as well as no nginx folder under /usr/share. Any idea what is an issue ?
@CloudAdvocate
@CloudAdvocate 4 года назад
You can easily create one and copy it.
@akshayasarangapani9122
@akshayasarangapani9122 4 года назад
@@CloudAdvocate yeah , that's what I did . created index.html file using vi editor and copied the content of html file. It just displayed the blank page
@najeebshaik9064
@najeebshaik9064 8 месяцев назад
Hi , My application runs when i run this command "docker run -p 8080:8080 [image name]" But after this command "kubectl expose deployment wb-server --type LoadBalancer --port 80 --target-port 80" The external ip address doesn't run anything. Can you please help me here. Thanks
@biswajitdash9343
@biswajitdash9343 3 года назад
I am trying to build and deploy an php application on gcp using docker and gke...can anyone help me please..
@herbertpurpora9452
@herbertpurpora9452 3 года назад
hello, how can we access the files inside a bucket? I'm a newbie in gcp
@subesingh7285
@subesingh7285 4 года назад
Hi GK, When you will upload new video in this series?
@CloudAdvocate
@CloudAdvocate 4 года назад
Soon Sube..:)
@prasanthimalepati8811
@prasanthimalepati8811 4 года назад
I am getting Connection refused error while trying to access the external IP.please help me on this.
@nileshmunnur573
@nileshmunnur573 2 года назад
I am building a containerized web application that has a .net frontend container and a REST Api backend container. I'd like to know which of these options is the best for our needs: · Deploy everything in the same cluster and node pool and let kubernetes manage and scale them as needed · Deploy everything in the same cluster and 2 different node pools with different machine types and node limits for frontend and backend · Deploy frontend and backend in different clusters all together with a single node pool each
@AllinOne-wn6wt
@AllinOne-wn6wt 4 года назад
we will deploy a docker image /container image(cad/web:version1) not a container in cluster am I correct.Then pod doesn't contain container. we can't make a ssh to the container image right. how do we make multiple container images in a single pod. Can we pull images from container registry and modify the images
@CloudAdvocate
@CloudAdvocate 4 года назад
Its container inside a pod. You can ssh to that. stackoverflow.com/questions/38485771/how-to-ssh-to-docker-container-in-kubernetes-cluster this link should help you.
@maamukutty
@maamukutty 4 года назад
Hey bro.. Thanks for the video.. I haven't gone deep into kubernetes yet..but to go for a starter, Can you please explain the difference between app engine vs kubernetes..
@CloudAdvocate
@CloudAdvocate 4 года назад
Good article on that Hari “App Engine Flex || Kubernetes Engine - ?” by Daz Wilkin link.medium.com/WTfhWW4wm8 :) Too lengthy to explain in comments.
@maamukutty
@maamukutty 4 года назад
@@CloudAdvocate Oh.. Thanks a lot for sharing this.. If u think its one good content for u to make a video on it.It's would be my pleasure 😜
@CloudAdvocate
@CloudAdvocate 4 года назад
@@maamukutty Sure good idea!!
@GigiMathewTX
@GigiMathewTX 4 года назад
Is it possible to do a video on adding Wordpress docker container with Kubernetes?
@CloudAdvocate
@CloudAdvocate 4 года назад
There is step by step guide here cloud.google.com/kubernetes-engine/docs/tutorials/persistent-disk
@Nepali_old_bhajans
@Nepali_old_bhajans 3 года назад
Sir, we need more videos on kubernetes.
@CloudAdvocate
@CloudAdvocate 3 года назад
Surs :)
@Sunil.khambadkar
@Sunil.khambadkar 4 года назад
Hello Sir, i am SAP security guy so everything is new for me and i started learning ACE from Udemy , but when i reached to Kubernetes i was stacked. but your video GKE part 1 helps me alot for understand the kubernetes. one question may be it's stupid one but how to create this file nginx:latest, shall i can also create my separate file?
@CloudAdvocate
@CloudAdvocate 4 года назад
Thats a command to pull the latest version of nginx image from the docker registry.
@Sunil.khambadkar
@Sunil.khambadkar 4 года назад
Okies got it thanks
@c00per_
@c00per_ 9 месяцев назад
I m from south India Which region should i select. [Im on free tier ]
@c00per_
@c00per_ 9 месяцев назад
Bro please reply
@Nepali_old_bhajans
@Nepali_old_bhajans 3 года назад
When I open a cloud shell I get something like this =: @cloudshell:~ (resonant-fiber-292023) but in your case, you got into the files folder. Please can you explain that part? thank you.
@CloudAdvocate
@CloudAdvocate 3 года назад
I must have gone into that folder :)
@danypremraj7121
@danypremraj7121 4 года назад
One question U said nginx default port is 8080 But while deploying in the kubernetes we have set both source and target port as 80. Why?????
@CloudAdvocate
@CloudAdvocate 4 года назад
Dani nginx default port is 80.
@danypremraj7121
@danypremraj7121 4 года назад
Thanks GK👍
@68naveeng
@68naveeng 4 года назад
could you please add video on CICD Jenkins, spinnaker, ansible, terraform attache with Kubernetes engine.
@CloudAdvocate
@CloudAdvocate 4 года назад
Thanks for suggestions Naveen. Are you suggesting separate videos on each services or using them with kubernetes?
@68naveeng
@68naveeng 4 года назад
Separate or single how we to integrate kubernate with Jenkins , ansible and terraform
@CloudAdvocate
@CloudAdvocate 4 года назад
@@68naveeng Thanks Naveen, will do that.
@aykageneration
@aykageneration 4 года назад
hello! is the same steps for deploy multiplayer android game (dedicated game server)?
@CloudAdvocate
@CloudAdvocate 4 года назад
Not sure what you mean by that :)
@aykageneration
@aykageneration 4 года назад
@@CloudAdvocate : i create multiplayer android game and i want host the dedicated game server so for doing that i need to create docker image then container after that with GKE (google kubernetes engine) + Agones create the dedicated game server...for me the problem how create docker image for my android game you undrestand me ? thank you
@aykageneration
@aykageneration 4 года назад
in your video you working for deploy sample of website so is the same work for deploy multiplayer game server? i hope you can see what i mean :)
@CloudAdvocate
@CloudAdvocate 4 года назад
Yes, if you are gonna run it as a container..you can try the same steps.
@thejaswinid9992
@thejaswinid9992 4 года назад
Hi Gk.i am getting error.Followed your steps but unable to view cloud advocate page.I can view only nginx.
@thejaswinid9992
@thejaswinid9992 4 года назад
34.69.114.108:31562/
@CloudAdvocate
@CloudAdvocate 4 года назад
Then maybe you didn't copy cloud advocate index.html. so you are left with default page.
@ngnaven
@ngnaven 4 года назад
Hi, I followed the same steps as above. But it is still showing some error. I think there is some problem in my Dockerfile. I get an error in the preview port step. Can you share your Dockerfile ? Also below are the contents of my Dockerfile. Please have a look. FROM nginx:alpine RUN rm -rf /usr/share/nginx/html COPY . /usr/share/nginx/html EXPOSE 8080 CMD ["nginx", "-g", "daemon off;"]
@CloudAdvocate
@CloudAdvocate 4 года назад
Hi Naveen, I don't think I have built from a dockerfile. I did it all manual to show more commands.
@arunrajj17cs94
@arunrajj17cs94 4 года назад
The first Command didn't run.(docker run -p 8080:80 nginx:latest). Please help docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. See 'docker run --help'.
@arunrajj17cs94
@arunrajj17cs94 4 года назад
solved : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-jeKnYZCcdvE.html
@CloudAdvocate
@CloudAdvocate 4 года назад
@@arunrajj17cs94 cool
@AnujTechShorts
@AnujTechShorts 4 года назад
type = sudo service docker start
@santroproin6969
@santroproin6969 4 года назад
Sir can you provide your files you have used in this video . in the description they are not there. OR repo link .
@CloudAdvocate
@CloudAdvocate 4 года назад
Sure Sandeep. Will do.
@santroproin6969
@santroproin6969 4 года назад
@@CloudAdvocate Sir if possible please upload in next few hours or tomorrow. It is important for me
@CloudAdvocate
@CloudAdvocate 4 года назад
@@santroproin6969 I was looking at my description. I have copied everything that I have it on my file. All the commands. Which script are you talking about?
@santroproin6969
@santroproin6969 4 года назад
@@CloudAdvocate the index.html files
@CloudAdvocate
@CloudAdvocate 4 года назад
@@santroproin6969 Please get it from github.com/cloudadvocate/google-cloud/blob/master/gke/index.html
@laukikkshirsagar4792
@laukikkshirsagar4792 3 года назад
Hey Hi GK,. Thank you for this video. I am new to this field and want to know how can I deploy .py or .sh file or any standalone App other than .html file... I mean what if I want to deploy standalone App instead of website... Do I need to containerize my app code every time or is there any other way other way. I may sound weired but I have lot of confusion on this.. please help
@CloudAdvocate
@CloudAdvocate 3 года назад
Yes, you have to build an image everytime.
@laukikkshirsagar4792
@laukikkshirsagar4792 3 года назад
Ok thank you,, but this deployment is on kubernetes cluster and that's why we have to containerize the application everytime. Can we do it without containerizing on a normal VM, instead of cluster
@CloudAdvocate
@CloudAdvocate 3 года назад
If you want to run ur app inside a container you have to follow the same with or without k8's. If you wanna run container in a vm..you can install docker and do it...still need an image.
@laukikkshirsagar4792
@laukikkshirsagar4792 3 года назад
@@CloudAdvocate thank you
@yogeshasalkar2507
@yogeshasalkar2507 3 года назад
GKE is IaaS, PaaS or SaaS?
@CloudAdvocate
@CloudAdvocate 3 года назад
IAAS
@tcarreira
@tcarreira 2 года назад
I understand why you did it, but please, avoid any `docker commit` on any tutorial or teaching content. There are many newcomers that think `docker commit` is acceptable. It is not (and I'm sure you agree, but the newcomers cannot distinguish good from bad) Otherwise, thanks for your content
@CloudAdvocate
@CloudAdvocate 2 года назад
Agreed.
Далее
Google Kubernetes Engine - Key Components
11:31
Просмотров 34 тыс.
Kubernetes 101: Deploying Your First Application!
40:47
Connect to Cloud SQL from App Engine in Google Cloud
15:50
Set up Terraform to create a GKE cluster
1:04:42
Просмотров 2,9 тыс.
Creating a GKE cluster (demo)
14:03
Просмотров 40 тыс.
КОМП-ПЫЛЕСОС
1:00
Просмотров 164 тыс.
iPhone socket cleaning #Fixit
0:30
Просмотров 19 млн