Menu

1 / 5

kubectl wait for condition fails on null conditions

DEV Community: kubernetes·Moep90·11 days ago
#6Ua1fICi
#devtokubernetes#devto#dev#kubectl#null
Reading 0:00
15s threshold

kubectl wait --for condition=Established crd/<name> is the usual way to

wait for a new CRD before applying resources of its kind.

It waits while the object has no status.conditions . It does not wait when

status.conditions is present and null : it exits at once with an error.

The kadet-hub/recipes CI hit that on 26 October 2026, with kubectl 1.37.1

against a kind node on Kubernetes 1.37.0:

error: kubectl --kubeconfig ... wait --for condition=Established --timeout 60s crd/rabbitmqclusters.rabbitmq.com exited 1 error: .status.conditions accessor error: <nil> is of the type <nil>, expected []interface{}

Enter fullscreen mode

Exit fullscreen mode

A rerun of the same job passed. The 60 second timeout never came into play.

Why kubectl gives up

kubectl reads the conditions with unstructured.NestedSlice in

checkCondition ( staging/src/k8s.io/kubectl/pkg/cmd/wait/condition.go ,

v1.37.2 ).

NestedSlice has three outcomes. A missing field returns "not found", and

checkCondition keeps waiting.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.