kubernetes-sigs / kind

Kubernetes IN Docker - local clusters for testing Kubernetes
https://kind.sigs.k8s.io/
Apache License 2.0
13.5k stars 1.56k forks source link

mount: /sys/fs/bpf: permission denied. #3545

Closed nueavv closed 7 months ago

nueavv commented 8 months ago

What happened: failed to install cilium cni. the mount-bpf-fs container log in cilium pod is "mount: /sys/fs/bpf: permission denied."

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
networking:
  disableDefaultCNI: true
  kubeProxyMode: none

First, create a cluster with this configuration on mac. and then install cilium cni with cilium cli. the cilium version is 1.15.1

Anything else we need to know?:

Environment:

BenTheElder commented 8 months ago

Er, cilium CNI isn't something we officially support, but it should work as I understand them to be using KIND for some of their CI.

Can you please test a minimal config first? Also in most cases you should not need multiple nodes unless you're testing some really specific multi-node related behavior.

BenTheElder commented 8 months ago

I think cilium is probably better equipped to support this based on https://docs.cilium.io/en/stable/installation/kind/, I do not work with cilium or bpf. A sufficiently privileged pod should be able to mount this.

I noticed you're using podman, which is semi-experimental still in kind and I'm not sure if the cilium project supports this.

nueavv commented 8 months ago

Okay, then I will try docker.

BenTheElder commented 7 months ago

Did it work with docker and/or following cilium's docs?

nueavv commented 7 months ago

yes, It works! thank you

BenTheElder commented 7 months ago

Good! I guess there is something off with this mount on the podman install, for now will close this 😅