# Popeye

> Read-only scanner that lints live Kubernetes clusters for misconfigurations, unused resources, and over/under allocation, with console, JSON, and HTML reports.

Stars: 6.5k · Language: Go · Categories: Dev Tools

- Repository: https://github.com/derailed/popeye
- Website: https://popeyecli.io
- Page: https://www.trmn.sh/tools/popeye

## Install

- Homebrew: `brew install derailed/popeye/popeye`
- Go: `go install github.com/derailed/popeye@latest`

## Overview

Popeye is a read-only linter for live Kubernetes clusters. It inspects resources as they are deployed rather than manifests on disk, and reports misconfigurations, stale or unused resources, and deviations from best practices. It does not modify any cluster resources. If the cluster runs a metric-server, it also reports likely CPU/memory over- or under-allocation and warns when the cluster may run out of capacity.

Linters cover Nodes, Namespaces, Pods, Services, ServiceAccounts, Secrets, ConfigMaps, Deployments, StatefulSets, DaemonSets, PersistentVolumes and Claims, HPAs, PodDisruptionBudgets, RBAC roles and bindings, Ingress, NetworkPolicies, and more. Example checks include port mismatches, containers using untagged or `latest` images, missing probes or resource requests/limits, unused ConfigMaps, Secrets and ServiceAccounts, node conditions, and utilization above a threshold (default 80% CPU/MEM). Each resource has a short alias such as `po`, `svc`, `dp` or `pvc`.

It runs against your current kubeconfig context. Use `-n` for a namespace, `-A` for all namespaces, `--context` to pick a context, and `-s pod,svc` to run specific linters. Linters can be tuned with a "spinach" YAML config passed via `-f spinach.yaml`. Reports can be rendered in the console, as JSON, or as HTML. Popeye also publishes Prometheus metrics, and the repo includes a sample Grafana dashboard. It is aimed at Kubernetes operators, SREs, and platform engineers auditing cluster health. It runs on Linux, macOS and Windows.

### Installation

```bash
# via Homebrew
brew install derailed/popeye/popeye
```

```bash
# via Go
go install github.com/derailed/popeye@latest
```

![Popeye console report](https://media.trmn.sh/cached/4926e4833984571b03f95be2abaab42797ca8cdbce2547d05ba588ca457dcd94.png)

![Popeye HTML report](https://media.trmn.sh/cached/34aa49e7109c977227d9d1d0176cda1b8b0dda7dec3e65e4bcc70e1a9ed6b431.png)

![Popeye Grafana dashboard](https://media.trmn.sh/cached/92a3fc8bb2999b532c03cc18201a3680e984f94ae0dfb1c9ab0a2c7384ca235b.png)

## Alternatives

- [Docker CLI](https://www.trmn.sh/tools/docker-cli.md): Source repository for the Docker command-line client, written in Go and built with docker buildx bake, with cross-platform and glibc/musl build targets. (Go, 6.1k stars)
- [Krew](https://www.trmn.sh/tools/krew.md): Package manager for kubectl plugins: discover, install, and manage plugins from a central index, similar to apt, dnf, or brew. (Go, 7.0k stars)
- [freeze](https://www.trmn.sh/tools/freeze.md): Generate PNG, SVG, and WebP images of code and terminal output with syntax highlighting and customizable styling. (Go, 4.9k stars)
- [scc](https://www.trmn.sh/tools/scc.md): Code counter written in Go that reports lines of code, comments, complexity, ULOC and COCOMO estimates across many languages, with multiple output formats. (Go, 8.9k stars)
- [reviewdog](https://www.trmn.sh/tools/reviewdog.md): Parses linter output and posts findings in changed lines as review comments on GitHub, GitLab, and Bitbucket, or filters lint results by diff locally. (Go, 9.7k stars)

---

Canonical: https://www.trmn.sh/tools/popeye
