리뷰 AK8S-04 Creating a GKE Cluster via Cloud Shell개

리뷰 4184개

Hao Y. · 6년 초과 전에 리뷰됨

NIZAMUDDIN G. · 6년 초과 전에 리뷰됨

jing h. · 6년 초과 전에 리뷰됨

Tushar A. · 6년 초과 전에 리뷰됨

Kenneth S. · 6년 초과 전에 리뷰됨

sam s. · 6년 초과 전에 리뷰됨

Shyam S. · 6년 초과 전에 리뷰됨

Alessandro K. · 6년 초과 전에 리뷰됨

Yaron l. · 6년 초과 전에 리뷰됨

Piotr Z. · 6년 초과 전에 리뷰됨

Sakalabttula Raj S. · 6년 초과 전에 리뷰됨

Charley E. · 6년 초과 전에 리뷰됨

Helen L. · 6년 초과 전에 리뷰됨

Javier G. · 6년 초과 전에 리뷰됨

Matt R. · 6년 초과 전에 리뷰됨

Sylvain L. · 6년 초과 전에 리뷰됨

Vishal S. · 6년 초과 전에 리뷰됨

#! /bin/bash # export variables export PROJECT_ID=qwiklabs-gcp-8d8c877aab0cce86 export my_zone=us-central1-a export my_cluster=standard-cluster-1 export node_count=3 # set your node count export my_nginx_pod=nginx-1-6866cfb98-8d48q export ip_addr=35.193.172.13 # todo: pull in from stdout echo "creating a 3 node cluster in $my_zone" gcloud container clusters create $my_cluster --num-nodes $node_count --zone $my_zone --enable-ip-alias wait; kubectl describe pod $my_nginx_pod kubectl cp ~/test.html $my_nginx_pod:/usr/share/nginx/html/test.html kubectl expose pod $my_nginx_pod --port 80 --type LoadBalancer kubectl get services # test to ensure test.html is exposed on port 80 given the external ip of the nginx pod curl http://$ip_addr/test.html # Check pod resources kubectl top pods # Lab Stuff git clone https://github.com/GoogleCloudPlatformTraining/training-data-analyst # move cd ~/training-data-analyst/courses/ak8s/04_GKE_Shell/ # deploy via manifest kubectl apply -f ./new-nginx-pod.yaml # get a list of pods kubectl get pods # run bash on new pod kubectl exec -it new-nginx /bin/bash # update pod apt-get update # get an editor apt-get install nano # make another test.html cd /usr/share/nginx/html # you will nano test.html .. make it whatevetr # exit the pod and port forward from port 1081 of the Cloud Shell VM to port 80 of the nginx pod kubectl port-forward new-nginx 10081:80 # runs in foreground (in a new tab or screen test) curl http://127.0.0.1:10081/test.html # get logs of pods from new-nginx kubectl logs new-nginx -f --timestamps

Cameron B. · 6년 초과 전에 리뷰됨

Juan P. · 6년 초과 전에 리뷰됨

Neelam N. · 6년 초과 전에 리뷰됨

Wenye Z. · 6년 초과 전에 리뷰됨

Great !!!

Johnnatan M. · 6년 초과 전에 리뷰됨

Mostafa G. · 6년 초과 전에 리뷰됨

Anjali J. · 6년 초과 전에 리뷰됨

Paul J. · 6년 초과 전에 리뷰됨

Google은 게시된 리뷰가 제품을 구매 또는 사용한 소비자에 의해 작성되었음을 보증하지 않습니다. 리뷰는 Google의 인증을 거치지 않습니다.