table of contents
Exposed Kubernetes clusters draw attackers like magnets. Recent flaws like CVE-2026-3288 in Ingress-NGINX let them inject code with a simple quote in a path field. You run clusters in production. One misconfig opens the door to credential theft or full compromise.
RBAC errors cause over 35% of breaches. Attackers grab secrets, pivot to cloud accounts. This guide walks you through a Kubernetes cluster audit. You’ll get steps, commands, and fixes for assets you own or have permission to check.
Start with discovery. Then check key spots. Follow up with remediations.
Risks of Exposed Kubernetes Clusters
Public-facing API servers top the list. Attackers probe open ports for weak auth. They exploit RBAC gaps to list pods or exec into them.
etcd snapshots hold all cluster state. Unencrypted exposure leaks configs, secrets. Nodes with hostPath mounts let escapes to the underlying OS.
Network policies often miss. Default allow-all traffic invites lateral moves. Recent trends show malware hunting env vars for kubeconfig files.
Supply chain hits hurt too. Poisoned images hide in registries. Once pulled, they mine crypto or exfil data.
You see warnings in scans. But ignore them at your peril. A quick audit spots these before exploits hit.
Step-by-Step Kubernetes Cluster Audit Process
Begin with safe verification. Use tools on clusters you control. No intrusive probes.
First, find exposures. Run kubectl get svc -A or nslookup yourdomain.com. Check for public IPs on API server. Default port 6443 should hide behind a bastion.

Next, test auth. Curl the API: curl -k https://your-api:6443/version. Expect 401 Unauthorized. Anonymous binds mean trouble.
Scan RBAC. kubectl auth can-i '*' '*' --all-namespaces. Cluster-admin roles on service accounts scream risk. Revoke them.
Check etcd. kubectl get cm -n kube-system etcd. Confirm TLS and auth. No certs? Data sits plain.
Probe network. kubectl get networkpolicies -A. Empty? Pods talk freely. Add denies.
For CIS benchmarks, install kube-bench: kube-bench run --benchmark cis-1.8. It flags control plane issues like insecure flags.
Log results. Ship audit logs to SIEM. See Kubernetes auditing docs for policy setup.
Each step takes minutes. Repeat weekly.
Core Checks for Kubernetes Cluster Security
Focus on control plane first. API server flags matter. ps aux | grep kube-apiserver shows args. Look for --anonymous-auth=true or no --authorization-mode=RBAC.
Pods run secure? kubectl get pods -A -o json | jq '.items[] | select(.spec.securityContext.runAsNonRoot != true)'. Root containers invite escapes.
Secrets stay safe. Avoid env vars. Use volumes from external vaults. Check kubectl get secrets -A.
Encryption covers etcd and kubelet. Verify --encryption-provider-config in apiserver.
Runtime threats need eyes. Tools like Falco watch execs, mounts.
For network, enforce policies. Default deny-all. Whitelist only.
Image scans block vulns. Integrate Trivy or Clair in CI.
These checks align with CIS Kubernetes Benchmarks.
Kubernetes Cluster Audit Checklist
Use this table for quick scans. Prioritize high-impact items.
| Audit Item | Check Command/Example | Risk if Failed | Priority |
|---|---|---|---|
| API Server Exposure | curl -k https://api:6443/version | Full cluster access | Critical |
| RBAC Over-Privileges | kubectl auth can-i create pods --all-namespaces | Lateral movement | Critical |
| etcd Encryption | kubectl get cm etcd -n kube-system | Secrets leaked | High |
| Network Policies | kubectl get netpol -A | East-west attacks | High |
| Pod Security | `kubectl get pods -A -o yaml | grep runAsNonRoot: false` | Container escapes |
| Audit Logging | kubectl get apiservice v1.audit.k8s.io | No forensics | Medium |
| Image Vulnerabilities | trivy image your-image | Exploits in runtime | Medium |
Run kube-bench for full CIS run. Fix criticals first.

Remediation Steps and Best Practices
Fix API exposure. Put a load balancer or proxy in front. Enable --tls-cert-file and client certs.
Tighten RBAC. Delete clusterrolebindings on default SAs. Use least privilege.
For etcd, add --encryption-provider-config with aescbc provider. Rotate keys quarterly.
Add network policies. Start with:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
Apply cluster-wide.
Enable audit logs. Create policy file:
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata
resources:
- group: ""
resources: ["secrets"]
Pass to apiserver: --audit-policy-file=policy.yaml.
Automate with Kyverno or OPA. Scan in CI/CD.
Update to latest K8s. Patch Ingress-NGINX beyond v1.15.1.
Follow CIS compliance scanning guide for jobs.
These steps build defense in depth.
Key Takeaways from Your Kubernetes Cluster Audit
Exposed clusters fall to simple misconfigs. Run audits often. Focus on API, RBAC, etcd.
Automation keeps you ahead. Tools like kube-bench and Falco alert fast.
Strong setups use RBAC, encryption, policies. Test them.
Need expert eyes? Book a Discovery Call with Bud Consulting for threat exposure management.
Your clusters stay secure with routine checks.
(Word count: 982)


