kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.5k stars 4.89k forks source link

`inspektor-gadget` addon fails to run #19710

Closed spowelljr closed 1 month ago

spowelljr commented 1 month ago
$ minikube start --addons=inspektor-gadget
πŸ˜„  minikube v1.34.0 on Darwin 14.7 (arm64)
✨  Automatically selected the docker driver. Other choices: qemu2, ssh, vfkit (experimental)
πŸ“Œ  Using Docker Desktop driver with root privileges
πŸ‘  Starting "minikube" primary control-plane node in "minikube" cluster
🚜  Pulling base image v0.0.45-1727108449-19696 ...
πŸ”₯  Creating docker container (CPUs=2, Memory=4000MB) ...
❗  Failing to connect to https://registry.k8s.io/ from inside the minikube container
πŸ’‘  To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
🐳  Preparing Kubernetes v1.31.1 on Docker 27.3.1 ...
    β–ͺ Generating certificates and keys ...
    β–ͺ Booting up control plane ...
    β–ͺ Configuring RBAC rules ...
πŸ”—  Configuring bridge CNI (Container Networking Interface) ...
πŸ”Ž  Verifying Kubernetes components...
    β–ͺ Using image ghcr.io/inspektor-gadget/inspektor-gadget:v0.32.0
    β–ͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass, inspektor-gadget
πŸ„  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

$ kubectl get pods -A
NAMESPACE     NAME                               READY   STATUS             RESTARTS      AGE
gadget        gadget-lm9mh                       0/1     CrashLoopBackOff   1 (12s ago)   18s
kube-system   coredns-7c65d6cfc9-99cd9           0/1     Running            0             18s
kube-system   etcd-minikube                      1/1     Running            0             24s
kube-system   kube-apiserver-minikube            1/1     Running            0             24s
kube-system   kube-controller-manager-minikube   1/1     Running            0             24s
kube-system   kube-proxy-l4nn5                   1/1     Running            0             18s
kube-system   kube-scheduler-minikube            1/1     Running            0             24s
kube-system   storage-provisioner                1/1     Running            0             22s

$ kubectl logs -n gadget gadget-lm9mh
time="2024-09-26T22:14:43Z" level=warning msg="reading config: open /etc/ig/config.yaml: no such file or directory"
time="2024-09-26T22:14:43Z" level=info msg="OS detected: Ubuntu 22.04.5 LTS"
time="2024-09-26T22:14:43Z" level=info msg="Kernel detected: 6.10.4-linuxkit"
time="2024-09-26T22:14:43Z" level=info msg="Gadget Image: ghcr.io/inspektor-gadget/inspektor-gadget"
time="2024-09-26T22:14:43Z" level=info msg="Deployment options:"
time="2024-09-26T22:14:43Z" level=info msg="[DEPRECATED] INSPEKTOR_GADGET_OPTION_FALLBACK_POD_INFORMER=true"
time="2024-09-26T22:14:43Z" level=info msg="[DEPRECATED] INSPEKTOR_GADGET_OPTION_HOOK_MODE=auto"
time="2024-09-26T22:14:43Z" level=info msg="Configuration options:"
time="2024-09-26T22:14:43Z" level=info msg="Inspektor Gadget version: v0.16.1"
time="2024-09-26T22:14:43Z" level=warning msg="INSPEKTOR_GADGET_OPTION_HOOK_MODE is deprecated. Use \"hook-mode\" instead in configmap"
time="2024-09-26T22:14:43Z" level=info msg="Gadget Tracer Manager hook mode: auto"
time="2024-09-26T22:14:43Z" level=info msg="Starting the Gadget Tracer Manager..."
time="2024-09-26T22:14:43Z" level=warning msg="INSPEKTOR_GADGET_OPTION_FALLBACK_POD_INFORMER is deprecated. Use \"fallback-pod-informer\" instead in configmap"
time="2024-09-26T22:14:43Z" level=warning msg="reading config: open /etc/ig/config.yaml: no such file or directory"
time="2024-09-26T22:14:43Z" level=info msg="HostPID=true"
time="2024-09-26T22:14:43Z" level=info msg="HostNetwork=true"
time="2024-09-26T22:14:43Z" level=info msg="HostCgroup=false"
time="2024-09-26T22:14:43Z" level=warning msg="ContainerNotifier: not supported: no container runtime can be monitored with fanotify. The following paths were tested: /bin/runc, /usr/bin/runc, /usr/sbin/runc, /usr/local/bin/runc, /usr/local/sbin/runc, /usr/lib/cri-o-runc/sbin/runc, /run/torcx/unpack/docker/bin/runc, /usr/bin/crun, /var/lib/rancher/k3s/data/current/bin/runc, /var/lib/rancher/rke2/bin/runc, /usr/bin/conmon. You can use the RUNTIME_PATH env variable to specify a custom path. If you are successful doing so, please open a PR to add your custom path to runtimePaths"
time="2024-09-26T22:14:43Z" level=warning msg="checking if current pid namespace is host pid namespace no runc instance can be monitored with fanotify. The following paths were tested: /bin/runc, /usr/bin/runc, /usr/sbin/runc, /usr/local/bin/runc, /usr/local/sbin/runc, /usr/lib/cri-o-runc/sbin/runc, /run/torcx/unpack/docker/bin/runc, /usr/bin/crun, /var/lib/rancher/k3s/data/current/bin/runc, /var/lib/rancher/rke2/bin/runc. You can use the RUNC_PATH env variable to specify a custom path. If you are successful doing so, please open a PR to add your custom path to runtimefinder.RuntimePaths"
time="2024-09-26T22:14:43Z" level=info msg="GadgetTracerManager: hook mode: podinformer (auto)"
time="2024-09-26T22:14:43Z" level=warning msg="Failed to retrieve socket path for runtime client from kubelet: getting /configz: fetching /configz from \"minikube\": unknown (get nodes minikube). Falling back to default container runtime"
time="2024-09-26T22:14:43Z" level=info msg="gadget tracermgr set in kubemanager"
time="2024-09-26T22:14:43Z" level=info msg="Serving on gRPC socket /run/gadgettracermanager.socket"
time="2024-09-26T22:14:43Z" level=info msg="Starting Pod controller"
time="2024-09-26T22:14:43Z" level=warning msg="EVENTS_BUFFER_LENGTH is deprecated. Use \"events-buffer-length\" instead in configmap"
time="2024-09-26T22:14:43Z" level=fatal msg="Environment variable EVENTS_BUFFER_LENGTH or config not set"

Seems that an env is missing from a YAML file, created an issue in the inspektor-gadget repo: https://github.com/inspektor-gadget/inspektor-gadget/issues/3522