derailed/k9s · warning

container is not ready

Error message

container is not ready

What it means

Container.diagnose drives the rollup health of the containers view: state 'Completed' is accepted as terminal-OK, otherwise a ready flag of false yields 'container is not ready'. It marks the row/container as unhealthy for display and for parent health aggregation — it does not block any operation.

Source

Thrown at internal/render/container.go:154

		client.ToPercentageStr(cur.mem, res.mem),
		client.ToPercentageStr(cur.mem, res.lmem),
		toMc(res.gpu) + ":" + toMc(res.lgpu),
		ToContainerPorts(cr.Container.Ports),
		AsStatus(c.diagnose(state, ready)),
		ToAge(cr.Age),
	}

	return nil
}

// Happy returns true if resource is happy, false otherwise.
func (Container) diagnose(state, ready string) error {
	if state == "Completed" {
		return nil
	}

	if ready == falseStr {
		return errors.New("container is not ready")
	}
	return nil
}

// ----------------------------------------------------------------------------
// Helpers...

func containerRequests(co *v1.Container) v1.ResourceList {
	req := co.Resources.Requests
	if len(req) != 0 {
		return req
	}
	lim := co.Resources.Limits
	if len(lim) != 0 {
		return lim
	}

	return nil

View on GitHub (pinned to 2d3ccc6ba2)

Solutions

  1. Describe the container's probes: kubectl describe pod <p> and check readiness/startup probe configuration and thresholds.
  2. For slow-starting apps add a startupProbe so readiness is not judged during boot.
  3. If the state is transient (rollout), simply wait and re-list — the flag clears when ready flips true.
Defensive patterns

Strategy: validation

Validate before calling

func containerHealthy(state, ready string) bool {
    return state == "Completed" || ready != "false"
}

Prevention

When it happens

Trigger: Listing containers for a pod where a container reports ready=false — startup probes not yet satisfied, crash loops, failed readiness probes, init containers still running.

Common situations: Inspecting pods during rollout (new containers not ready yet); apps with long startup times without a startupProbe; misconfigured readiness probes failing after deploys; Jobs whose sidecars show not-ready while the main container completed.

Related errors


AI-assisted analysis of derailed/k9s@2d3ccc6ba2 (2026-08-15). Data as JSON: /api/errors/b708cca6a2bb2427. Report an issue: GitHub.