SidecarContainerStarting
KubernetesINFOCriticalPod LifecycleHIGH confidence

Sidecar container is starting before main containers

Production Risk

Low — normal startup state; only a concern if it persists beyond expected startup time.

What this means

A sidecar container (defined as an initContainer with restartPolicy: Always) is in the SidecarContainerStarting state. This is a normal transitional state in the Kubernetes 1.28+ SidecarContainers feature where sidecars are started before main containers and stopped after them.

Why it happens
  1. 1Pod uses the SidecarContainers feature gate (enabled by default in 1.29+).
  2. 2An initContainer is defined with restartPolicy: Always, making it a sidecar.
  3. 3The sidecar container image is being pulled or the container process is initializing.
How to reproduce

Pod is starting up and a sidecar container has not yet reported Ready.

trigger — this will error
trigger — this will error
kubectl describe pod my-pod
# Init Containers:
#   my-sidecar:
#     State: Waiting
#       Reason: SidecarContainerStarting

expected output

State:          Waiting
  Reason:       SidecarContainerStarting

Fix 1

Wait for the sidecar to become ready

WHEN Pod is in normal startup sequence

Wait for the sidecar to become ready
kubectl get pod my-pod -w

Why this works

SidecarContainerStarting is transient; once the sidecar passes its startup/readiness probe it transitions to Running.

Fix 2

Check sidecar container logs if startup is prolonged

WHEN Sidecar remains in SidecarContainerStarting for more than expected

Check sidecar container logs if startup is prolonged
kubectl logs my-pod -c my-sidecar
kubectl describe pod my-pod | grep -A 15 "my-sidecar:"

Why this works

Logs reveal application errors; describe shows probe configuration and recent events.

What not to do

✕

Version notes
Kubernetes 1.28

SidecarContainers feature gate introduced as alpha.

Kubernetes 1.29

SidecarContainers promoted to beta and enabled by default.

Sources
Official documentation ↗

Kubernetes 1.28 — Sidecar Containers

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All Kubernetes errors