CICD-288 · Custom resource validation
Encyclopedia · Advanced Kubernetes operations · All snippets
Previous · CICD-287 · Next · CICD-289
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites kubectl, isolated cluster or namespace and installed CRDs when named.
- Platforms kubernetes, local-lab.
- Parameters
CRD_NAME.
2. Copy the snippet
bash
kubectl wait --for=condition=Established "crd/${CRD_NAME:?}" --timeout=60s
kubectl -n staging apply --dry-run=server -f manifests/example-resource.yaml3. How it works
The wait command polls for the named condition until it appears or the timeout is reached. Server-side dry run sends the candidate through API validation and admission without persisting the change.
4. Verify the result
Server acceptance confirms schema and admission, while reconciliation still needs separate status checks.
Validation syntax-validated (Bash parse). Status definitions.