Basic Troubleshooting and Retrieving Logs from vSphere CSI
search cancel

Basic Troubleshooting and Retrieving Logs from vSphere CSI

book

Article ID: 379178

calendar_today

Updated On:

Products

VMware Telco Cloud Automation

Issue/Introduction

Follow this document to troubleshoot issues with the CSI (Container Storage Interface) and retrieve logs and collection of CSI logs
 

 

Resolution

View Logs from CSI Controller Pods
 
Use the following command to view logs for a specific pod and container in the CSI deployment:
 
kubectl logs -f <pod-name> -c <container-name> -n <namespace>
 
Replace the placeholders as follows:
 
• <pod-name>: The name of the CSI controller pod.

• <container-name> The name of the container within the pod.
Options include:
• csi-provisioner
• csi-attacher
• csi-resizer
• vsphere-csi-controller
• liveness-probe
• vsphere-syncer

• <namespace>: The namespace where the CSI driver is deployed.
 

Examples of listing the logs:

kubectl logs -f <pod-name> -c <container-name> -n <namespace>

kubectl logs -f csi-vmware-controller-7b85fcfb5b-8hg48 -c csi-provisioner -n kube-system

Export Logs to a File

To export the logs for further analysis, you can redirect the output to a file:

kubectl logs <pod-name> -c <container-name> -n <namespace> > csi-logs.txt

This command will save the logs to csi-logs.txt in your current directory.

Additional Information

By following these steps, you can efficiently access and save the necessary logs to assist with CSI troubleshooting.