# Workload reliability

> How LevelFour rates each workload's risk as High, Medium or Low from what the agent reports, the evidence behind each level in the Why column and the Why it is High card, and what to change when a workload is crash looping.

Source: https://docs.levelfour.ai/kubernetes/reliability


LevelFour rates the risk of each workload from what the agent sends every hour. Each problem it finds is an indicator with a level, and the workload takes the level of its most severe indicator. Only High counts as at risk, in the cluster and fleet totals alike.

## Risk levels

| Level      | What it means                                               | What raises it                                                                                                                                                                                                                                                                                                                                                                            |
| ---------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **High**   | Failing now or on the next node drain                       | An OOM kill or an eviction in the window; no replica ready in the latest batch; or crash looping, no replica ready while the pods keep restarting                                                                                                                                                                                                                                         |
| **Medium** | Running with a problem that can grow into a failure         | 3 or more restarts per pod across 2 hours or more; an hour or more with the CPU throttled a quarter of the time or more; pods Pending for 15 minutes or more in the latest hour watched; memory or CPU climbing in a steady line since the last restart, in LevelFour's latest scan; a JVM whose heap and what it uses beside it can outgrow the memory limit its pods were admitted with |
| **Low**    | A setting leaves it exposed, and nothing has gone wrong yet | Memory p99 at 90% of the limit or more, in 2 hours or more and a quarter of the hours watched; pods that ran in the latest batch with no CPU request or no memory request                                                                                                                                                                                                                 |

Other findings inform and set no level: a CPU or memory request well below or well above what the container uses, an HPA at its maximum replicas, a PodDisruptionBudget that allows no voluntary disruption, 3 or more replicas with no topology spread or pod anti-affinity, and a memory request with no memory limit.

## Why it is High

The workload lists on the **Reliability** tab, on the **Kubernetes** page and on each cluster's page, have a **Why** column. It shows each workload's High, Medium and Low indicators as badges, two at most and a count of the rest. Findings that only inform stay out of it. The tab's **Indicators** table names each indicator with its rule and the number of workloads raising it. Click a number to list those workloads, the riskiest first. In the **Workloads** tab, the **Reliability** lens adds an **Indicators** column with the High and Medium ones alone, and reads **Nothing raised** for a workload with neither.

Open a workload, and the **Reliability** section of its drawer starts with a card named after its level: **Why it is High**, **Why it is Medium** or **Why it is Low**. The card says what the level means, then lists the indicators that set it, one per line. Each line gives the indicator, the evidence as LevelFour measured it, the container, and the time it started in UTC: an **OOM kills** badge, then `3 OOM kills in api since Nov 18 14:00 UTC`. Under **Also found** come the workload's other High and Medium indicators, and under **Configuration** the rest: Low findings and the ones that only inform. Configuration also says when a long-running container has no readiness probe, because Kubernetes then reports the pod as ready as soon as the container runs. A workload with nothing raised says so for the dates you picked.

Each line comes from data the agent sends, as [What the agent reads](/kubernetes/agent-permissions-and-data#what-it-sends) lists it: restarts, OOM kills and CPU throttling per container, evictions, Pending time and replica counts per workload, and usage percentiles, which LevelFour compares with each container's requests and limits. A steady climb comes from LevelFour's own scan of each container's usage since its last restart. The JVM line compares the heap the agent reads, plus what [the JVM reader](/kubernetes/agent-permissions-and-data#the-jvm-reader) measured beside it, with the memory limit the pods were admitted with. Counts cover the dates you picked on the page. A steady climb covers the scan's own lookback, whatever dates you pick.

## Crash loops

A workload is crash looping when its pods keep restarting and none of its replicas is ready. Kubernetes waits longer before each restart, up to five minutes, and lists the pods as `CrashLoopBackOff`. LevelFour rates it High.

To find the cause, open the workload's drawer on its **Reliability** section. **How each container last stopped** gives each container's reason and exit code, as `kubectl describe pod` shows its Last State. The reason decides the change:

| Reason                               | What happened                                                           | What to change                                                                                                                                                              |
| ------------------------------------ | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `OOMKilled`, exit code 137           | The container used more memory than its limit                           | Raise the memory limit, or fix what keeps growing. The **OOM kills** line in **Why it is High** says how often it happened                                                  |
| `Error`, exit code 1 or another code | The process stopped on its own                                          | Read the logs of the run that stopped, with `kubectl logs <pod> -c <container> --previous`. A missing setting, secret or dependency is the usual cause                      |
| Exit code 143, or signal 15          | Kubernetes stopped the container, often after its liveness probe failed | Compare the probe's path, port and `initialDelaySeconds` with how long the app takes to start. The pod events in the same section show `Unhealthy` with the probe's message |
| `Completed`, exit code 0             | The process finished, and Kubernetes started it again                   | A Deployment expects a process that keeps running. Run a task that ends as a Job or a CronJob                                                                               |

Only `OOMKilled` calls for more memory. For every other reason, a new CPU or memory request leaves the crash loop as it is.
