Kubectl Nmap is the fastest way to scan ports inside a Kubernetes cluster without leaving your terminal. No extra nodes. No external tools. Just the certainty of knowing what is open, where, and why.
Combining kubectl with nmap gives direct visibility into your cluster’s network surface. Run Nmap inside a pod, target a service or container, and pull real-time results. It is precise, scriptable, and works with CI pipelines for automated network audits.
Why Kubectl Nmap matters:
- Detect unauthorized open ports in seconds.
- Verify service configurations after deployment.
- Audit cluster security without disrupting workloads.
- Troubleshoot networking issues directly from Kubernetes context.
Basic usage example:
kubectl run nmap --rm -i --tty \
--image=instrumentisto/nmap -- \
nmap my-service.default.svc.cluster.local
This launches an ephemeral pod using the Nmap image, scans the target service, and dumps results back to your shell. The pod disappears once done, leaving no footprint.