View application logs in the terminal

kubectl logs <pod>

Example:

kubectl logs data-preparation-5d5459f5cd-dvl7p

To view logs for a pod from a different namespace

kubectl -n <namespace> logs <pod>

Example:

kubectl -n kube-system logs kubernetes-dashboard-7ddbdf6949-xmqlh

Note: Pods are docker containers.

 

View application logs in the dashboard

Access the Kubernetes dashboard here:
https://hostname/admin

or

https://hostname:16443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy

Scroll down to the Pods section, or click the Pods link in the left side menu, and click the Logs button.

pods-logs.jpg

 

The logs will open in a new tab. To view the complete log, download the file, by clicking the Download logs button.

logs-ui.jpg

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.