VCP-CMA 2024 exam dumps

VCP-CMA 2024 practice question 147 of 269

VMware Certified Professional - Cloud Management and Automation 2024. Associate level, VMware. Free question with the correct answer and a full explanation.

VCP-CMA 2024 Question 147

Select 2

An administrator is troubleshooting a Kubernetes cluster deployed as part of a VMware Aria Automation setup. They need to retrieve the logs of a specific pod to investigate an issue. Which 'kubectl' commandlet options should they use?

  1. A

    kubectl logs

  2. B

    kubectl get pods

  3. C

    kubectl describe pod

  4. D

    kubectl logs --previous

  5. E

    kubectl exec -it -- /bin/bash

Show answer and explanation

Correct answers: A, D

Explanation

To investigate an issue with a pod, the 'kubectl logs ' command is used to fetch the logs of the running pod. If the pod has restarted or crashed, the '--previous' option can be added to retrieve logs from the previous instance. Together, these options enable effective troubleshooting of pod-related issues in a Kubernetes cluster managed by VMware Aria Automation.

  • A. Correct.

    This command retrieves the logs of the specified pod, which is necessary for troubleshooting. It is a valid option.

  • B. Incorrect.

    This command lists all the pods in the cluster, but it does not retrieve logs. It is not relevant for the administrator’s requirement.

  • C. Incorrect.

    This command provides detailed information about the pod's configuration and status, but it does not retrieve logs. It is not the correct option for this scenario.

  • D. Correct.

    This command retrieves the logs from the previous instance of the pod, which can be useful if the pod has crashed or restarted recently. It is a valid option.

  • E. Incorrect.

    This command allows the administrator to execute commands inside a running pod but does not directly retrieve logs. It is not the correct option for this scenario.

Timed practice exam

Take a VCP-CMA 2024 practice test under exam conditions

60 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam