istio: Isitio 1.24 deploy istio-cni with no missing privilegeds causing pods creation failures

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

Hello,

I am trying to deploy istio 1.24.2 using istioctl, but it stuck on deploying CNI stage and eventually fails:

...
- Processing resources for CNI. Waiting for DaemonSet/kube-system/istio-cni-node 
✘ CNI encountered an error: failed to wait for resource: resources not ready after 5m0s: context deadline exceeded
  
Error: failed to install manifests: failed to wait for resource: resources not ready after 5m0s: context deadline exceeded

Looking into istio-cni-nodes pods we see the following error:

2025-01-23T14:15:53.782388Z     error   cni-agent       Failed to start up UDS Log Server: failed to create UDS listener: failed to listen on unix socket "/var/run/istio-cni/log.sock": listen unix /var/run/istio-cni/log.sock: bind: permission denied
Error: failed to create UDS listener: failed to listen on unix socket "/var/run/istio-cni/log.sock": listen unix /var/run/istio-cni/log.sock: bind: permission denied

We managed to workaround it by patching istio-cni-node to have privileged=true, right after istioctl install creates it but its not sustainable and flaky.

Version

$ ./istioctl version 
client version: 1.24.2
control plane version: 1.24.2
data plane version: 1.24.2 (3 proxies)
$ kubectl version 
selecting podman as container runtime
Client Version: v1.30.8
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.8

Additional Information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I managed to make CNI pod work by setting IstioOperator CR as follows:

  k8s:
    securityContext:
      seLinuxOptions:
        type: spc_t

Heh, I actually missed that istioctl IstioOperator have a completely separate k8s subkey for this stuff, which I presume gets munged into Helm-shape (which does not have this key) eventually.

Without setting profile: openshift. @howardjohn @bleggett thank you so much for the support 🙏

Glad that was it, I apologize for us having multiple install mechanisms that are subtly different.

Its vanilla k8s cluster used for integration testing on Kubevirt CI.

I tried using profile: openshift, it does set spc_t and CNI pods are healthy! But it still doesnt work istio-egressgateway pod wont start due to the following error:

  Warning  Failed          7s (x5 over 35s)  kubelet            Error: container has runAsNonRoot and image will run as root (pod: "istio-ingressgateway-7f45f776cb-gf2vw_istio-system(dafa9f04-6efc-461a-837d-009ed807cd1a)", container: istio-proxy)

In addition I noticed it doesnt deploy ingressgateway, we use it for testing Istio Gateway API.

This has nothnig to do with this issue I think. gateway pods have no correlation to the CNI pods. Would be good to open a new issue with more info about your setup (there are many ways to deploy a gateway so the specific one will matter)