DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to get a security summary of a Kubernetes cluster with Trivy

Run Trivy k8s to scan a cluster and print a summary report of what needs attention.

Short answer: Install Trivy and make sure your kubectl context points at the cluster you want to scan; then run trivy k8s --report summary cluster; review the summary to find the workloads with the most serious findings. All steps.

Credentials. The scan uses your current kubeconfig credentials, so run it against the intended cluster with read access only.

Who it is forA platform engineer who wants a quick security overview of a cluster without buying a commercial tool.

The problemClusters run many images and manifests, and nobody has a clear picture of their combined risk.

The outcomeA summary report across the cluster that points to the workloads to fix first.

What you need first

  • Trivy via `brew install trivy`, the aquasec/trivy Docker image, or a release binary
  • Access to the image, folder, repo or Kubernetes cluster you want to scan

Steps

  1. Install Trivy and make sure your kubectl context points at the cluster you want to scan
  2. Run trivy k8s --report summary cluster
  3. Review the summary to find the workloads with the most serious findings
  4. Fix images and manifests, starting with the highest severities
  5. For continuous scanning, look at the Trivy Kubernetes operator in the Ecosystem page

Prompt for your agent

Using aquasecurity/trivy, run a summary scan of my current Kubernetes context and list the ten workloads with the most critical findings, with a suggested fix for each. Do not change anything in the cluster.

Caveat. Scanning a large cluster can take a while and pulls image data, so try it on a test cluster first.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for aquasecurity/trivy and "Get a security summary of a Kubernetes cluster"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer