## TL;DR

kube-linter blocks `privileged: true` containers because they can escape to the host. Drop the flag and grant only the specific capabilities the workload needs, or document the exception if the workload genuinely requires it.

## Error

```text
kube-linter: container "agent" has privileged status (privileged-container)
```

## Steps

1. Find the privileged container in the flagged manifest. Expected: `securityContext.privileged: true` (or the default when the check requires an explicit context).
2. Remove `privileged: true` and add the minimal capabilities instead, e.g. `capabilities: add: ["NET_ADMIN"]`. Expected: the workload still functions without full privilege.
3. If the container genuinely needs privilege (device access, nested runtimes), add a kube-linter ignore annotation with a justification. Expected: the check passes with the exception documented.
4. Re-run `kube-linter lint` on the manifests. Expected: no privileged-container findings.

## When to use

- kube-linter reports the privileged-container check on the PR.
- The manifests are Kubernetes YAML or Helm output.

## When not to use

- A different kube-linter check fails (e.g. run-as-non-root)  -  fix that check instead.
- The workload is a privileged DaemonSet by design; use the documented exception path.

## Tool compatibility

- kube-linter 0.5+.
- Kubernetes 1.20+.

## Variant phrasings

### Privileged via Helm chart default

Override with `--set securityContext.privileged=false` or values, rather than forking the chart.

### Needs hostPath instead of privileged

hostPath has its own kube-linter check; both need justification.

## Why it happens

A privileged container has nearly the same power as root on the host. kube-linter fails the gate because privileged workloads are the most common container-escape vector, so each one must be deliberate.

## Edge cases

- Dropping privileged can break workloads that relied on it implicitly  -  test in a non-prod cluster first.
- Capabilities are still powerful; grant the narrowest set the workload needs.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_s7uLMPBMHcHtr-tzL-3BmA
