Kubernetes Cluster Logs
Overview⚓︎
This guide gives basic instructions for finding and viewing logs with kubectl or k9s.
Kubernetes logging is available through kubectl or k9s. The Google Kubernetes Engine also gives a console view on the Operations Logging page.
Log files make troubleshooting and pinpointing issues easier.
Use kubectl to list and view pod logs⚓︎
To get the logs for a Kubernetes instance:
- Run
kubectl get podsfor a list of your pods. - Use
kubectl logs PODNAME_TO_VIEW --namespace=$HDX_KUBERNETES_NAMESPACEto see specific logs.
Use k9s to view logs⚓︎
To see logs in k9s:
- Launch
k9sfrom a terminal to connect to the current Kubernetes context. - Select a pod to view.
- Open the Logs panel for the selected pod.