I am not really sure how to formulate properly this question, really beginner with k8s. I am creating a playground for k3s on a laptop, wanting to install cilium and prometheus/grafana monitoring. For that purpose i installed rancher-desktop which created sandboxed environment that runs k3s inside a vm (running on a laptop)
I installed cilium on rancher-desktop v1.0.0 with the helm:
helm install cilium cilium/cilium --version 1.11.1 \
--namespace kube-system \
--set prometheus.enabled=true \
--set operator.prometheus.enabled=true \
--set hubble.enabled=true \
--set hubble.metrics.enabled="{dns,drop,tcp,flow,port-distribution,icmp,http}"
It installs, but cilium container fails to start:
Error: failed to generate container "0fae98546697febc25abb4ac49d5e5a2f27a3ee1781bade900f2c767f8d6df28" spec: failed to generate spec: path "/run/cilium/cgroupv2" is mounted on "/run/cilium/cgroupv2" but it is not a shared or slave mount
That leads me to believe that bpf is not mounted. Now, I am versed in Linux but really a novice with k8s. The rancher-desktop packs k3s and starts it in a vm (my pc is Ubuntu 20.04 based). So, qemu starts this vm (lima-rancher-desktop) and I can login into it. I assumed that BPF should be enabled in that VM (it is not). But, maybe I am wrong. Maybe it is inside some containers inside k3s? I enabled BPF even on my laptop, but this doesn't help, k3s runs inside that VM, Here are the pods:
kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system local-path-provisioner-84bb864455-z2659 1/1 Running 0 4h28m
kube-system helm-install-traefik-crd--1-dxcg7 0/1 Completed 0 4h28m
kube-system svclb-traefik-7kqgd 2/2 Running 0 4h28m
kube-system helm-install-traefik--1-lbjhw 0/1 Completed 1 4h28m
kube-system metrics-server-ff9dbcb6c-rmvd9 1/1 Running 0 4h28m
kube-system traefik-55fdc6d984-zpk5s 1/1 Running 0 4h28m
cilium-monitoring prometheus-655fb888d7-mbnb9 1/1 Running 0 3h52m
cilium-monitoring grafana-5747bcc8f9-rj5jk 1/1 Running 0 3h52m
kube-system cilium-operator-5ffd7d9795-ktldm 0/1 Pending 0 3m26s
kube-system cilium-operator-5ffd7d9795-b8ls9 1/1 Running 0 3m26s
kube-system cilium-d5xr4 0/1 Init:CreateContainerError 0 3m26s
kube-system coredns-96cc4f57d-r99zl 1/1 Running 0 7s
I would appreciate if someone can explain where should BPF be mounted: inside that VM, or inside some container on k3s, and how to mount it?
Note: it doesn't mount in VM anyway:
mount --bind /var/run/bpf /var/run/bpf
has no effect whatsoever and doesn't mount anything, as if it is read-only.