Commands for monitoring applications
Monitoring the health of applications deployed on Kubernetes as well as the Kubernetes infrastructure itself is essential to provide a reliable service to your customers. There are two primary use cases for monitoring:
- Ongoing monitoring to get alerts if something is not behaving as expected
- Troubleshooting and debugging applications errors
When monitoring an application running on top of a Kubernetes cluster, you'll need to examine multiple things in parallel, including containers, Pods, Services, and the nodes in the cluster. For ongoing monitoring, you'll need a monitoring system such as Azure Monitor or Prometheus. For troubleshooting, you'll need to interact with the live cluster. The most common commands used for troubleshooting are as follows:
kubectl get <resource type> <resource name> kubectl describe <resource type> <resource name> kubectl logs <pod name>
We'll...