Elastic Container Instance (ECI) does not support Kubernetes DaemonSets on virtual nodes. A common workaround is to inject a sidecar container into an ECI-based pod to replicate DaemonSet behavior — for example, to run a log collector or monitoring agent. By default, if that sidecar enters a NotReady state, the entire pod is marked NotReady, which blocks traffic to otherwise-healthy application containers. To decouple sidecar readiness from pod readiness, set the ECI_CONTAINER_IGNORE_READY environment variable on the sidecar container.
How it works
Pod readiness is determined by two conditions in status.conditions:
| Condition | Meaning |
|---|---|
ContainersReady | All containers in the pod are ready. |
Ready | The pod can serve requests (used by Services for load balancing). |
Normally, if any container is NotReady, both conditions are False. When you set ECI_CONTAINER_IGNORE_READY: "true" on a container, ECI excludes that container from readiness evaluation. Both ContainersReady and Ready can reach True even while that container remains NotReady.
Prerequisites
Before you begin, make sure you have:
An ACK Serverless cluster with ECI-based virtual nodes
kubectlconfigured to connect to your cluster
Ignore the NotReady state of a sidecar container
Create a Deployment manifest. The following example creates a Deployment with two containers:
c1runs normally, andc2has no startup command and cannot enter the Ready state.ECI_CONTAINER_IGNORE_READYis set onc2to exclude it from readiness evaluation.apiVersion: apps/v1 kind: Deployment metadata: name: test-ignore labels: app: test spec: replicas: 1 selector: matchLabels: app: test template: metadata: labels: app: test spec: containers: - name: c1 image: registry.cn-shanghai.aliyuncs.com/eci_open/perl:5 command: ["/bin/sh", "-c", "sleep 999"] - name: c2 image: registry.cn-shanghai.aliyuncs.com/eci_open/centos:7 env: - name: ECI_CONTAINER_IGNORE_READY value: "true"Apply the manifest.
kubectl apply -f test-ignore.yaml
Verify the configuration
After the pod starts, check its readiness conditions to confirm that the NotReady state of c2 is being ignored.
Retrieve the pod status.
kubectl get pod <pod-name> -o yamlIn the output, locate the
status.conditionssection. WithECI_CONTAINER_IGNORE_READYset correctly, both conditions showTrue:status: conditions: - type: ContainersReady status: "True" - type: Ready status: "True"
The following screenshot shows an example of the expected output.
