Search code examples
kubernetesapache-camelminikubeapache-camel-k

`camel-k-operator` pod in `CrashLoopBackOff`


I'm following the documentation procedure and enabling the registration add-on in minikube.

So I'm running

minikube start --addons registry
kamel install

to start the cluster and install Camel K into it.

But when I run kubectl get pod I get CrashLoopBackOff as the camel-k-operator status.

kubectl get events gave me the following:

LAST SEEN   TYPE      REASON              OBJECT                                   MESSAGE
7m9s        Normal    Scheduled           pod/camel-k-operator-848fd8785b-cr9pp    Successfully assigned default/camel-k-operator-848fd8785b-cr9pp to minikube
7m5s        Normal    Pulling             pod/camel-k-operator-848fd8785b-cr9pp    Pulling image "docker.io/apache/camel-k:1.9.2"
2m23s       Normal    Pulled              pod/camel-k-operator-848fd8785b-cr9pp    Successfully pulled image "docker.io/apache/camel-k:1.9.2" in 4m45.3178036s
42s         Normal    Created             pod/camel-k-operator-848fd8785b-cr9pp    Created container camel-k-operator
42s         Normal    Started             pod/camel-k-operator-848fd8785b-cr9pp    Started container camel-k-operator
43s         Normal    Pulled              pod/camel-k-operator-848fd8785b-cr9pp    Container image "docker.io/apache/camel-k:1.9.2" already present on machine
55s         Warning   BackOff             pod/camel-k-operator-848fd8785b-cr9pp    Back-off restarting failed container
7m9s        Normal    SuccessfulCreate    replicaset/camel-k-operator-848fd8785b   Created pod: camel-k-operator-848fd8785b-cr9pp
7m9s        Normal    ScalingReplicaSet   deployment/camel-k-operator              Scaled up replica set camel-k-operator-848fd8785b to 1

Running kubectl logs [podname] -p I get

{
    "level":        "error",
    "ts":           1658235623.4016757,
    "logger":       "cmd",
    "msg":          "failed to set GOMAXPROCS from cgroups",
    "error":        "path \"/docker/ec4a100d598f3529dbcc3a9364c8caceb32abd8c11632456d58c7948bb756d36\" is not a descendant of mount point root \"/docker/ec4a100d598f3529dbcc3a9364c8caceb32abd8c11632456d58c7948bb756d36/kubelet\" and cannot be exposed from \"/sys/fs/cgroup/rdma/kubelet\"",
    "stacktrace":   "github.com/apache/camel-k/pkg/cmd.(*operatorCmdOptions).run\n\tgithub.com/apache/camel-k/pkg/cmd/operator.go:57\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v1.4.0/command.go:860\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.4.0/command.go:974\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.4.0/command.go:902\nmain.main\n\tcommand-line-arguments/main.go:47\nruntime.main\n\truntime/proc.go:225"
}

Formatting the stacktrace we get:

github.com/apache/camel-k/pkg/cmd.(*operatorCmdOptions).run
    github.com/apache/camel-k/pkg/cmd/operator.go:57
github.com/spf13/cobra.(*Command).execute
    github.com/spf13/cobra@v1.4.0/command.go:860
github.com/spf13/cobra.(*Command).ExecuteC
    github.com/spf13/cobra@v1.4.0/command.go:974
github.com/spf13/cobra.(*Command).Execute
    github.com/spf13/cobra@v1.4.0/command.go:902
main.main
    command-line-arguments/main.go:47
runtime.main
    runtime/proc.go:225

Camel K Client 1.9.2

minikube v1.25.2


Solution

  • It's probably a bug with the docker driver.

    A workaround is to use the hyperv driver instead:

    minikube start --addons registry --driver hyperv