Whenever our application behaves abnormally, we need to figure out what has happened with our system. We can do this by checking logs, resource usage, a watchdog, or even getting into the running host directly to dig out problems. In Kubernetes, we have kubectl get and kubectl describe, which can query controller states about our deployments. This helps us determine whether an application has crashed or whether it is working as desired.
If we want to know what is going on using the output of our application, we also have kubectl logs, which redirects a container's stdout and stderr to our Terminal. For CPU and memory usage stats, there's also a top-like command we can employ, which is kubectl top. kubectl top node gives an overview of the resource usage of nodes, while kubectl top pod <POD_NAME> displays per-pod usage:
$ kubectl top node...