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

Use the same Lima for both containers and Kubernetes #5206

Closed
afbjorklund opened this issue Dec 11, 2023 · 1 comment · Fixed by #4539
Closed

Use the same Lima for both containers and Kubernetes #5206

afbjorklund opened this issue Dec 11, 2023 · 1 comment · Fixed by #4539
Labels
area/extension/lima 🟢 kind/enhancement ✨ Issue for requesting an improvement

Comments

@afbjorklund
Copy link
Contributor

afbjorklund commented Dec 11, 2023

Is your enhancement related to a problem? Please describe

Currently you can only create a "podman" or "docker" instance, or a "k3s" or "k8s" instance (with containerd).

It is not possible to start Kubernetes on the container engine, nor to access the container runtime of the cluster.

https://podman-desktop.io/docs/lima/customizing

Even if you make a custom template, Podman Desktop currently makes the connections mutually exclusive.

So that when you have the type "kubernetes", you are not able to also have it provide access to the containers.

Describe the solution you'd like

Make it possible for the same (Lima) provider, to have both a connection endpoint* and a kubernetes endpoint*.

  • a unix socket, like: docker.sock

  • a tcp socket, like: port 6443

pd-resources-lima-both

pd-preferences-lima-both

In theory you could even run both Docker and Podman on the same instance, but that would be less useful...

Describe alternatives you've considered

You can run "kind", using the podman or docker instance.

We could add another instance field, and run two machines.

The current workaround is to change the provider type in Preferences: Lima, and then restart the Lima provider.

Of course, then you can't access both containers and Kubernetes at the same time (but only one type at a time).

Additional context

No response

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Jan 7, 2024

Here are some ready-to-run examples, with containers and kubernetes in the same lima:

https://github.com/afbjorklund/lima/tree/podman-desktop/examples/podman-desktop

  • Docker Engine (docker.sock) + Kubernetes (containerd runtime)

  • Podman Engine (podman.sock) + Kubernetes (cri-o runtime)

The engines and runtimes will share images (or snapshots, for containerd), but not share containers.

You can build or load an image with docker, and it will quickly be available in the cluster (sudo crictl).

  • Docker 24.0.5 + Kubernetes 1.29.0 (with flannel)

  • Podman 4.8.2 + Kubernetes 1.29.0 (with flannel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/extension/lima 🟢 kind/enhancement ✨ Issue for requesting an improvement
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants