how to get logs of deployment from kubernetes

You can try kubectl describe deploy monitoring-influxdb to get some high-level view of the deployment, maybe some information here.

For more detailed logs, first get the pods: kubectl get po Then, request the pod logs: kubectl logs <pod-name>


kubectl logs deployment/<name-of-deployment> # logs of deployment
kubectl logs -f deployment/<name-of-deployment> # follow logs

Adding references of two great tools that might help you view cluster logs:

  1. If you wish to view logs from your terminal without using a "heavy" 3rd party logging solution I would consider using K9S which is a great CLI tool that help you get control over your cluster.

  2. If you are not bound only to the CLI and still want run locally I would recommend on Lens.

Tags:

Kubernetes