Read the signals the cluster already keeps

  • 12 min
  • 6 steps
  • Operate and ship

Steps

0 of 6 done

A web tier is serving traffic and a cache keeps restarting. Use resource metrics, container logs and events, the signals every cluster has without a monitoring stack, to find out what each workload is doing and why the cache dies.

  1. Step 1 of 6

    Show the CPU and memory each node is using at this moment, as metrics-server last measured it.

    Checked against what your commands print.

  2. Step 2, not started: List the pods in the default namespace with the heaviest memory user first. Note which workload it belongs to.

  3. Step 3, not started: The cache pod's restart count keeps climbing. Find the reason its last container instance terminated.

  4. Step 4, not started: Read what the cache printed in the container instance that was killed, not the instance that is running.

  5. Step 5, not started: List only the Warning events in the namespace, so the noise of Scheduled, Pulled and Started events drops out.

  6. Step 6, not started: Show the last log line from every web replica in one command, with each line labelled by the pod and container it came from.

Lab terminal

Cluster time 2 minutes
kind cluster kx, Kubernetes 1.37.
Each step is checked as you work.
​
Tab completes. Up and Down recall.
Type help for more.
Terminal keys

Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.