kubernetes/kops · error
not all objects were healthy
Error message
not all objects were healthy
What it means
After confirming all objects were applied, ClientApplier.Apply verifies health via results.AllHealthy(). If any applied object is not healthy, this error is returned. The objects exist on the cluster but have not converged to a healthy state (e.g. a Deployment not yet available or a CR reporting an unhealthy status).
Source
Thrown at channels/pkg/channels/clientapplier.go:85
}
if err := s.SetDesiredObjects(applyableObjects); err != nil {
return err
}
results, err := s.ApplyOnce(ctx)
if err != nil {
return fmt.Errorf("failed to apply objects: %w", err)
}
// TODO: Implement pruning
if !results.AllApplied() {
return fmt.Errorf("not all objects were applied")
}
// TODO: Check object health status
if !results.AllHealthy() {
return fmt.Errorf("not all objects were healthy")
}
return nil
}
View on GitHub (pinned to 4c8573c808)
Solutions
- kubectl get/describe the applied objects to find which are unhealthy and why.
- Check pod events for scheduling/image errors if a Deployment is unhealthy.
- Wait for the resource to become ready (rollout status) and re-check; consider adding retry/wait logic around Apply.
- Ensure CRDs are Established before applying their custom resources.
- Fix the underlying workload issue exposed by the manifest (replicas, resources, image tags).
Example fix
// before
err := applier.Apply(ctx, manifest)
// after
err := applier.Apply(ctx, manifest)
if err != nil { return err }
// allow workloads to converge, then verify
if err := wait.PollUntilContextTimeout(ctx, 5*time.Second, 5*time.Minute, true, func(ctx context.Context) (bool, error) {
return deploymentsHealthy(ctx, client), nil
}); err != nil { return err } Defensive patterns
Strategy: fallback
Type guard
func isUnhealthyResult(err error) bool {
return strings.Contains(err.Error(), "not all objects were healthy")
} Try / catch
if err := applier.Apply(ctx, manifest); err != nil {
if isUnhealthyResult(err) {
// objects exist; inspect which are unhealthy and wait for convergence
return waitForConvergence(ctx, manifest)
}
return err
} Prevention
- Allow convergence time after apply before judging health (poll rollout status).
- Check pod scheduling (taints, capacity, image pull) for Deployments.
- Ensure CRDs are Established before applying dependent CRs.
- kubectl describe failing objects to see health conditions early.
When it happens
Trigger: results.AllHealthy() returning false — an object was created/patched but its health check fails, e.g. a Deployment with unavailable replicas, a CRD not established, or a resource stuck Pending.
Common situations: Applying an addon whose pods fail to schedule (insufficient capacity, taints), images that can't be pulled, CRDs still being processed, or checking health immediately after apply without allowing convergence time.
Related errors
- not all objects were applied
- error adding needs-update label: %v
- error applying annotation to record addon installation: %v
- error patching needs-update label: %v
- error parsing version spec %q
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/0ed6ca0588e7ea97.
Report an issue: GitHub.