Metrics reported by Kubernetes
Kubernetes reports multiple metrics. In this section, you'll first use a number of kubectl
commands to get these metrics. Afterward, you'll look into Azure Monitor for containers to see how Azure helps with container monitoring.
Node status and consumption
The nodes in your Kubernetes are the servers running your application. Kubernetes will schedule pods to different nodes in the cluster. You need to monitor the status of your nodes to ensure that the nodes themselves are healthy and that the nodes have enough resources to run new applications.
Run the following command to get information about the nodes on the cluster:
kubectl get nodes
The preceding command lists their name, status, and age:
Figure 7.24: There are two nodes in this cluster
You can get more information by passing the -o wide
option:
kubectl get -o wide nodes
The output lists the underlying OS-IMAGE
and INTERNAL-IP
, and other...