Practice Test 2 | Google Cloud Certified Associate Cloud Engineer | Dumps | Mock Test
Your company is running a high availability deployment “hello-server” in Kubernetes Engine on port 8080 which needs to be exposed to public internet using a load balancer on port 80. Which of the following commands will help to accomplish this deployment?
A. kubectl expose deployment hello-server –type LoadBalancer –port 8080 –target-port 80
B. kubectl run deployment hello-server –type LoadBalancer –port 80 –target-port 8080
C. kubectl expose deployment hello-server –type LoadBalancer –port 80 –target-port 8080
D. kubectl run deployment hello-server –type LoadBalancer –port 8080 –target-port 80
Explanation:
Answer C
Option C is correct: You can expose the deployment on port 80 by routing the request to target port 8080 using this command.
Option A is incorrect: The request is getting generated at port 8080 and routed to deployment at port 80 which is not correct.
Option B and D are incorrect: run command does not support the type argument and is used to create a deployment.
Link:
https://cloud.google.com/kubernetes-engine/docs/quickstart
Comments are closed, but trackbacks and pingbacks are open.