How To
Summary
How to capture Kubernetes SDC process details without connecting container shell
Objective
Capturing logs with help of kubectl command for kubernetes pod where SDC engine is running.
In this article you will get to know how to gather details without connecting to container shell.
Steps
You can use below command as per the requirements of the troubleshooting of kubernetes deployment issues and for viewing logs.
Below commands would help you understand the architecture and details about the infrastructure of Kubernetes pod and deployment.
For getting kubernetes process details :
kubectl exec <pod-name> -n <namespace> -- ps aux
For getting details of ongoing process and memory usage with top command
kubectl exec <pod-name> -n <namespace> -c <container-name> -- top
For getting details in kubernetes container for disk usage, packages etc
kubectl exec <pod-name> -n <namespace> -c <container-name> -- df -h kubectl exec <pod-name> -n <namespace> -c <container-name> -- dpkg -l
For reading logs without connecting to the container :
kubectl exec <pod-name> -n <namespace> -c <container-name> -- cat /path/to/logfile.log
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
16 March 2025
UID
ibm17186358