Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to running minikube under lima #14776

Closed
thr3a opened this issue Aug 11, 2022 · 11 comments
Closed

Failed to running minikube under lima #14776

thr3a opened this issue Aug 11, 2022 · 11 comments
Labels
co/docker-driver Issues related to kubernetes in container co/runtime/containerd kind/bug Categorizes issue or PR as related to a bug. os/macos priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@thr3a
Copy link

thr3a commented Aug 11, 2022

What Happened?

I have tried to install minikube on a virtual environment built using lima but it fails.

Environment

Macbook M1

❯ lima -v
limactl version 0.11.3
❯ which lima
/opt/homebrew/bin/lima

❯ docker -v
Docker version 20.10.17, build 100c70180f
❯ which docker
/opt/homebrew/bin/docker
❯ docker context list
NAME            DESCRIPTION                               DOCKER ENDPOINT                                      KUBERNETES ENDPOINT                ORCHESTRATOR
default         Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                          https://127.0.0.1:6443 (default)   swarm
lima-docker *                                             unix:///Users/thr3a/.lima/default/sock/docker.sock

❯ minikube version
minikube version: v1.26.1
commit: 62e108c3dfdec8029a890ad6d8ef96b6461426dc
❯ which minikube
/opt/homebrew/bin/minikube

Command

minikube start --driver=docker --container-runtime=containerd --alsologtostderr -v=1

I confirmed that the installation failed as well after running the initialization command (minikube delete --all --purge).

Attach the log file

log.txt

Operating System

macOS (Default)

Driver

Docker

@afbjorklund
Copy link
Collaborator

You might need to set the DOCKER_HOST, explicitly. I don't think all clients understand the "context" (yet)

But the root cause seems to be stray binary characters in the output from the commands over ssh ?

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 11, 2022

We discussed various ways to run under lima, but it is not yet a supported docker platform

The default is to just install containerd and kubeadm on the Lima VM directly... (k8s.yaml)

It should support running with docker-in-docker too, even rootless, but it is not tested

@afbjorklund
Copy link
Collaborator

It worked ok with lima on Linux, using rootless docker

So the docker host (vs context) warnings were not related

@afbjorklund afbjorklund added kind/bug Categorizes issue or PR as related to a bug. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. co/docker-driver Issues related to kubernetes in container co/runtime/containerd labels Aug 11, 2022
@thr3a
Copy link
Author

thr3a commented Aug 11, 2022

I have tried several patterns and have successfully installed minikube only when the virtual machine architecture is aarch64 and rootful.

In the case of x86_64 & rootful, the installation proceeded better than in the other cases but eventually failed.

lima arch \ rootless? rootful rootless(default)
aarch64
x86_64

x86_64-rootful.txt

※ In both cases, DOCKER_HOST is set.

@afbjorklund
Copy link
Collaborator

Could be related to the flaky "user" networking on Mac then (known lima issue...) Can you try with "vde", to see if it helps ?

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 11, 2022

It seems to have the same issue as on other platforms, when the Unix socket is not local but tunneled to another machine in secret... It seems to be using 192.168.52.2 for the IP, while Lima wants it to be 127.0.0.1 (tunneled)

In the Lima k3s/k8s examples, this is done with sed on kube config...

Here it is even worse, since it is tunneled again (to the fakenode)

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 11, 2022

It might have worked better with lima minikube, but then you can't use the local host editor and browser properly (similar to the local "none" vs the remote "ssh" driver issues)

@thr3a
Copy link
Author

thr3a commented Aug 11, 2022

@afbjorklund
Sorry, I don't know much about vde, do you mean vde_vmnet?

If I install vde_vmnet and add the following network settings, will the 'vde' configuration requirements be met?

networks:
  - lima: host

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 11, 2022

Turns out the 192.168.58 was a freak show with minikube deciding that 192.168.49 was in use on the host, and therefore deciding to use 192.168.49 + 9 for the docker network without noticing it was the same network as the Lima VM...

Anyway, minikube doesn't work with lima and tunneling sockets. It expects real IPs and TCP sockets, the way it was with docker-machine

For now, you have to run lima minikube instead. (Linux)

It could be made to work, if there was any interest. But so far, there hasn't been - not from lima, not from kind. So we're doing the "qemu" driver in minikube instead (of lima)

@thr3a
Copy link
Author

thr3a commented Aug 11, 2022

I realized that the way I tried to run minikube under lima was not the standard way.
Actually, I also tried lima minikube(arch: x86_64), but it was too slow, so I decided to install minikube on Linux host.
(I understand that the slow problem is not caused by minikube or lima.)

Thank you.

@thr3a thr3a closed this as completed Aug 11, 2022
@afbjorklund
Copy link
Collaborator

I realized that the way I tried to run minikube under lima was not the standard way.

It is quite normal, if you try to replace Docker Desktop with Lima (docker).

Just not working very well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container co/runtime/containerd kind/bug Categorizes issue or PR as related to a bug. os/macos priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

2 participants