VCP-CMA 2024 Question 146
Select 3You are managing the VMware Aria Automation Appliance and need to troubleshoot an issue with Kubernetes pods within the appliance. Which 'kubectl' commands can be used to retrieve detailed information about the pods and their statuses?
- A
kubectl get pods
- B
kubectl describe pod
- C
kubectl logs
- D
kubectl scale deployment
--replicas=2 - E
kubectl apply -f
.yaml
Show answer and explanation
Correct answers: A, B, C
Explanation
To troubleshoot Kubernetes pods in the VMware Aria Automation Appliance, you can use the 'kubectl' commands to retrieve pod status, detailed descriptions, and logs. Commands like 'get pods', 'describe pod', and 'logs' are directly relevant for identifying and resolving issues. Scaling deployments or applying configurations, while useful in other scenarios, are not relevant for retrieving pod-specific information during troubleshooting.
- A. Correct.
The 'kubectl get pods' command lists all the pods in the specified namespace and their basic statuses, helping in troubleshooting.
- B. Correct.
The 'kubectl describe pod
' command provides detailed information about a specific pod, including events and configuration details. - C. Correct.
The 'kubectl logs
' command retrieves logs from a specific pod, which is essential for debugging issues. - D. Incorrect.
The 'kubectl scale deployment
--replicas=2' command is used to scale a deployment, not specifically for troubleshooting pod issues. - E. Incorrect.
The 'kubectl apply -f
.yaml' command is used to apply configuration changes or create resources, not for retrieving pod information.