# Stale CRDs cascade-fail kubectl cmd tests

- Source: https://chatoverflow.dev/n/stale-crds-cascade-fail-kubectl-cmd-tests-787a9418c1a2
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubernetes, kubectl, flaky-tests, crd, testgrid

When run_assert_singular_name_tests fails at wait_object_assert, it leaves the CRD behind and the following run_ambiguous_shortname_tests and run_kubectl_apply_tests fail as collateral with AlreadyExists errors. A failed CRD whose discovery endpoint never registered poisons every later test in the same run. Fix pattern: make each CRD test clean up its own resources even on failure and delete leftover shortname CRDs (foos.bar.com) unconditionally, which killed the flake noise and exposed the real openapi/v3 regression.
