Need Expert Kubernetes Security?
Our DevSecOps team secures Kubernetes clusters with admission controllers, CIS benchmarks, and runtime protection.
What Is Kubernetes Manifest Validation
Kubernetes manifests are YAML or JSON files that define the desired state of resources in a Kubernetes cluster — pods, deployments, services, configmaps, network policies, and more. Manifest validation checks these files for syntax errors, schema violations, security misconfigurations, and best practice deviations before they are applied to a cluster.
Catching configuration errors before deployment prevents outages, security vulnerabilities, and compliance violations. A single misconfigured securityContext, missing resource limit, or overly permissive RBAC role can expose your cluster to privilege escalation, resource exhaustion, or data breaches.
How Kubernetes Manifest Validation Works
Validation occurs at multiple levels:
| Level | What It Checks | Example Issue |
|---|---|---|
| Syntax | Valid YAML/JSON structure | Indentation errors, missing colons, invalid characters |
| Schema | Correct API fields and types | Misspelled field names, wrong value types, missing required fields |
| Security | Security best practices | Running as root, missing network policies, privileged containers |
| Resource | Resource management | Missing CPU/memory limits, no pod disruption budgets |
| Policy | Organizational standards | Non-compliant labels, unapproved images, missing annotations |
Common Security Misconfigurations
- Running containers as root —
securityContext.runAsNonRoot: falseor omitted - Privileged containers —
securityContext.privileged: truegrants full host access - Missing resource limits — No CPU/memory limits enable resource exhaustion attacks
- Host network/PID namespace —
hostNetwork: truebreaks network isolation - Writable root filesystem —
readOnlyRootFilesystem: falseallows malware persistence - No network policies — All pod-to-pod traffic is permitted by default
Common Use Cases
- CI/CD pipeline gates: Validate manifests automatically before deployment to catch errors and security issues in pull requests
- Security hardening: Audit existing manifests against CIS Kubernetes Benchmark and NSA/CISA hardening guidelines
- Shift-left security: Enable developers to check their own manifests for security issues during development, before code review
- Compliance enforcement: Ensure all deployments meet organizational policies for labels, resource limits, image registries, and security contexts
- Migration validation: When migrating workloads between clusters or upgrading Kubernetes versions, validate that manifests are compatible with the target API version
Best Practices
- Enforce non-root containers — Set
runAsNonRoot: trueand specify a non-zerorunAsUserin every pod's securityContext. Very few workloads genuinely require root. - Always set resource limits — Define CPU and memory requests and limits for every container. This prevents noisy neighbors and resource exhaustion denial-of-service.
- Use read-only root filesystems — Set
readOnlyRootFilesystem: trueand mount writable volumes only where needed. This prevents malware from modifying container filesystems. - Validate in CI, enforce in admission — Use this tool and similar validators in your CI pipeline for early feedback, and deploy OPA Gatekeeper or Kyverno as admission controllers for runtime enforcement.
- Pin image tags to digests — Use image digests (@sha256:...) instead of mutable tags (:latest) to prevent supply chain attacks through tag manipulation.
Frequently Asked Questions
Common questions about the Kubernetes Manifest Validator
The validator checks against CIS Kubernetes Benchmark controls including: privileged containers (CIS-5.2.1), hostPID/hostIPC/hostNetwork (CIS-5.2.2-4), runAsNonRoot (CIS-5.2.6), dangerous capabilities (CIS-5.2.7), privilege escalation (CIS-5.2.8), resource limits, read-only filesystem, image pull policy, and health probes.
ℹ️ Disclaimer
This tool is provided for informational and educational purposes only. All processing happens entirely in your browser - no data is sent to or stored on our servers. While we strive for accuracy, we make no warranties about the completeness or reliability of results. Use at your own discretion.