Practice Test 1 | Google Cloud Certified Associate Cloud Engineer | Dumps | Mock Test
Your team has deployed a GKE cluster having 3 nodes for High Availability. The cluster was tested multiple times before moving to production, but it suddenly stopped working after deploying it to production environment. A team member approached you that he will need shell access to the container for a while to resolve the issue. Which command will give him access to the container?
A. kubectl exec -i -t whizlabs-web-server — /bin/bash
B. kubectl whizlabs-web-server ssh — /bin/bash
C. kubectl ssh whizlabs-web-server /bin/bash
D. kubectl exec whizlabs-web-server /bin/bash
Explanation:
Correct Answer – A
The correct command to get shell access of a container is kubectl exec -i -t whizlabs-web-server — /bin/bash. Hence, A is the correct answer.
Options B, C, and D are incorrect because these are invalid commands to get the shell access of a container.
Reference:
https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/
Comments are closed, but trackbacks and pingbacks are open.