istio: [Ambient] Failure in CNI with AWS EKS in a scale-to-zero scenario
Is this the right place to submit this?
- This is not a security vulnerability or a crashing bug
- This is not a question about how to use Istio
Bug Description
The issue took place on AWS EKS. At present, the pods are communicating effectively with each other. In an effort to reduce costs, I decided to scale in the node group during the night. To achieve this, I adjusted the Auto Scaling Group (ASG) to zero instances. Upon returning to work in the morning, I scaled out the node group back to three instances. However, all the pods in the ambient service mesh were unable to initiate the container, remaining in the ‘ContainerCreating’ state. When I attempted to describe one of them, I encountered the following error messages.
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 25m default-scheduler 0/3 nodes are available: 1 node(s) had untolerated taint {node.kubernetes.io/not-ready: }, 2 node(s) had untolerated taint {node.kubernetes.io/network-unavailable: }. preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.
Warning FailedScheduling 14m (x2 over 19m) default-scheduler 0/3 nodes are available: 3 node(s) had untolerated taint {node.kubernetes.io/network-unavailable: }. preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.
Normal Scheduled 12m default-scheduler Successfully assigned namespace-ac/unchained-http-proxy-5cb9d54ddd-9cph9 to ip-xx-xxx-xx-xxx.region.compute.internal
Warning FailedCreatePodSandBox 12m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "6b9a5001f515c72eb1d8d26150778f688ad2b7f59727a18e45adb0f9d1a3fb80": plugin type="calico" failed (add): stat /var/lib/calico/nodename: no such file or directory: check that the calico/node container is running and has mounted /var/lib/calico/
Warning FailedCreatePodSandBox 11m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "3d03b422a0e53aae3c9476841e9acca2677816ee3975a07aae15c3585bf3cdd8": plugin type="istio-cni" name="istio-cni" failed (add): unable to push CNI event (status code 500): partial add error: no ztunnel connection
Warning FailedCreatePodSandBox 11m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "4eac913e35dc5d796937ef5621bda1318931ef9d966cfeeb9b63e8175535ac39": plugin type="istio-cni" name="istio-cni" failed (add): unable to push CNI event (status code 500): partial add error: no ztunnel connection
Warning FailedCreatePodSandBox 11m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "0fda94ac3a428f0dbe0bcd6622ddf94f0d949bdc1f13026f44bc74bab32c1b30": plugin type="istio-cni" name="istio-cni" failed (add): unable to push CNI event (status code 500): partial add error: no ztunnel connection
Warning FailedCreatePodSandBox 11m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "591dae970568167483a450c5ce1949125afbfcb5e606847d183e9c99b777c911": plugin type="istio-cni" name="istio-cni" failed (add): unable to push CNI event (status code 500): partial add error: no ztunnel connection
Warning FailedCreatePodSandBox 11m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "6fdad46e14774cc3e48c3217204f0ed4cb95b2e9444bcd0e989bbc0dc862ba31": plugin type="istio-cni" name="istio-cni" failed (add): unable to push CNI event (status code 500): failed to add IP ::ffff:10.100.214.85 with and proto 6 to ipset istio-inpod-probes: exist
Warning FailedCreatePodSandBox 11m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "9582fbf6d2ecc2d64b328d5089ce7d13f5c1c2ef8f7bf45afcb35d4266b7dc51": plugin type="istio-cni" name="istio-cni" failed (add): unable to push CNI event (status code 500): failed to add IP ::ffff:10.100.214.102 with and proto 6 to ipset istio-inpod-probes: exist
Warning FailedCreatePodSandBox 11m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "b2d4b1251beee67d2b126d03a3718d4ecdfdd9ae12b3e3d6cdc51a0414026be7": plugin type="istio-cni" name="istio-cni" failed (add): unable to push CNI event (status code 500): failed to add IP ::ffff:10.100.214.117 with and proto 6 to ipset istio-inpod-probes: exist
Warning FailedCreatePodSandBox 11m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "30b7b633a31ae1deedd74b8579a4a487c52043f0b934e083ece6d56fda961cd8": plugin type="istio-cni" name="istio-cni" failed (add): unable to push CNI event (status code 500): failed to add IP ::ffff:10.100.214.127 with and proto 6 to ipset istio-inpod-probes: exist
Normal SandboxChanged 11m (x13 over 12m) kubelet Pod sandbox changed, it will be killed and re-created.
Warning FailedCreatePodSandBox 2m13s (x168 over 11m) kubelet (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "0beeeef7f2cbb90c5526971675aca71d6b8bc42571fdf3ed83b91ef433a07847": plugin type="istio-cni" name="istio-cni" failed (add): unable to push CNI event (status code 500): failed to add IP ::ffff:10.100.214.115 with and proto 6 to ipset istio-inpod-probes: exist
Version
$ istioctl version -n kube-system -i kube-system
client version: 1.22.3
control plane version: 1.22.3
data plane version: 1.22.3 (4 proxies)
Additional Information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 33 (20 by maintainers)
That all tracks. I’ll leave this issue open until 1.22.4 is out at least, keep us posted. (and apologies we didn’t catch this sooner).
Hello, we are also having a similar problem, we also use Karpenter, and randomly when a new node appears this issue happens, we can see the following:
istio-cnidaemonset.Istio-cni daemonset is running image:
docker.io/istio/install-cni:1.22.3-distroless.Is there any dev build we can try to see if it solves the issue? Thanks!
I’m also experiencing a similar issue with EKS and istio 1.22.3 in ambient-mode. I also use Karpenter. I couldn’t find what went wrong exactly, but this cluster in particular spawns a lot of containers during the day.
I was able to make it “fix itself” on some attempts by restarting the istio-cni-node DaemonSet, but there were times that not even that would work. So, I’m not sure. (EDIT: actually, I probably restarted both DaemonSets, istio-cni and ztunnel, so, not so sure what restart helped more, but I couldn’t find anything super relevant in the ztunnel logs I could get.)
For the mean time, I disabled ambient-mode for this namespace and everything came back to working normally.
Thanks!
Here are the events I got for one of the pods:
And some log lines from the istio-cni-node DaemonSet. This keeps printing for each pod experiencing the issue.