Kubernetes and deployment
Encyclopedia home · Search machine-readable catalog
The broken snippets are deliberate negative examples. Use only in an isolated fixture repository or lab.
F083
Wrong kubeconfig context
Symptom. namespace or object differs from intended deployment.
Root cause. Default context can point to another cluster.
Broken example
kubectl apply -f web.yamlCorrected example
test "$(kubectl config current-context)" = "${EXPECTED_CONTEXT:?}"
kubectl --context "$EXPECTED_CONTEXT" -n staging apply --dry-run=server -f web.yamlVerification. Test with a second local context and confirm preflight fails closed.
Correction validation syntax-validated.
F084
Wrong namespace
Symptom. deployments.apps web not found.
Root cause. Resource exists outside default namespace.
Broken example
kubectl rollout status deployment/webCorrected example
kubectl -n staging rollout status deployment/web --timeout=180sVerification. Verify namespace and discover matching deployment.
Correction validation syntax-validated.
F085
Manifest API version removed
Symptom. no matches for kind Ingress.
Root cause. Modern cluster removed extensions API for Ingress.
Broken example
apiVersion: extensions/v1beta1
kind: IngressCorrected example
apiVersion: networking.k8s.io/v1
kind: IngressVerification. Migrate backend schema too and run server dry run.
Correction validation syntax-validated.
F086
Container not ready
Symptom. Readiness probe failed HTTP statuscode 404.
Root cause. Probe route differs from service contract.
Broken example
readinessProbe: {httpGet: {path: /wrong, port: 8000}}Corrected example
readinessProbe: {httpGet: {path: /readyz, port: 8000}}Verification. Verify Pod Ready and EndpointSlice routing.
Correction validation syntax-validated.
F087
ImagePullBackOff
Symptom. Failed to pull image and ImagePullBackOff.
Root cause. Reference doesn't exist or credentials are not scoped.
Broken example
image: registry.example.com/web:missingCorrected example
image: registry.example.com/web:validated-stagingVerification. Check actual candidate digest and probe Registry access before applying.
Correction validation syntax-validated.
F088
CrashLoopBackOff missing required config
Symptom. back-off restarting failed container.
Root cause. Process starts without required configuration variable.
Broken example
env: []Corrected example
env:
- name: CONFIG_PATH
value: /etc/web/config.tomlVerification. Check previous logs and mount the referenced ConfigMap.
Correction validation syntax-validated.
F089
Resource unable to schedule
Symptom. FailedScheduling Insufficient cpu/memory.
Root cause. Requests exceed eligible node capacity in lab.
Broken example
requests: {cpu: "64", memory: 128Gi}Corrected example
requests: {cpu: "250m", memory: 128Mi}Verification. Set based on observed workload and recheck scheduling events.
Correction validation syntax-validated.
F090
Service selects wrong label
Symptom. EndpointSlices contain no ready endpoints.
Root cause. Selector does not match Pod labels.
Broken example
selector: {component: web}Corrected example
selector: {app: web}Verification. Compare selectors to actual Pods and smoke-test the Service.
Correction validation syntax-validated.
F091
Service port target mismatch
Symptom. connection refused despite healthy Pods.
Root cause. Service maps traffic to a port the app doesn't use.
Broken example
- {port: 80, targetPort: 9000}Corrected example
- {port: 80, targetPort: 8000}Verification. Probe Service and Pod directly to isolate routing.
Correction validation syntax-validated.
F092
Rollback fights GitOps desired state
Symptom. reverted image reappears.
Root cause. Controller reconciles toward current Git target.
Broken example
kubectl -n staging rollout undo deployment/webCorrected example
git revert "${BAD_CONFIG_COMMIT:?}"Verification. Review and submit revert via approved GitOps path. Observe expected revision and rollout.
Correction validation syntax-validated.
F093
Apply waits incorrectly for health
Symptom. run reports success while Pods fail.
Root cause. Apply returns before deployment convergence.
Broken example
kubectl -n staging apply -f web.yamlCorrected example
kubectl -n staging apply -f web.yaml
kubectl -n staging rollout status deploy/web --timeout=180sVerification. Force a bad readiness fixture and verify pipeline fails.
Correction validation syntax-validated.
F094
Namespace termination hung on finalizer
Symptom. namespace stays Terminating.
Root cause. A controller may need to finish resource cleanup.
Broken example
kubectl delete namespace preview-42 --wait=trueCorrected example
kubectl get namespace preview-42 -o json | jq '{conditions:.status.conditions,finalizers:.spec.finalizers}'Verification. Restore controller health and verify dependent resources before considering owner-approved recovery.
Correction validation syntax-validated.