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

Lima and K3s configuration #699

Open
dee-kryvenko opened this issue Sep 28, 2021 · 5 comments
Open

Lima and K3s configuration #699

dee-kryvenko opened this issue Sep 28, 2021 · 5 comments
Assignees
Labels
kind/documentation-devhelp For work that needs documenting but requires an engineer to help docs kind/enhancement New feature or request

Comments

@dee-kryvenko
Copy link

How does one configure Lima and K3s for Rancher desktop?

If I edit ~/Library/Application Support/rancher-desktop/lima/0/lima.yaml - is it persistent or do I need to modify some other file?

How do I configure K3s, for instance if I need to give it a --resolve-conf - how would I do that in a persistent manner?

@jandubois
Copy link
Member

If I edit ~/Library/Application Support/rancher-desktop/lima/0/lima.yaml - is it persistent or do I need to modify some other file?

You can, but only partially. RD will merge in its default settings whenever it starts the instance, so it might override your changes. E.g. you can add an additional mountpoint at the end of the mounts list, but if you insert it earlier, RD will overwrite it with the default setting on the next restart.

Due to this brittleness, direct editing is not officially supported. But given that it is the only way to modify the setup, sometimes a person has to do what a person has to do...

How do I configure K3s, for instance if I need to give it a --resolve-conf - how would I do that in a persistent manner?

There is no mechanism to do this at the moment. We are planning to make k3s more configurable, like adding options to enable/disable some of the default services (traefik, metrics-server, etc).

Please file a separate issue with the part that you want to be configurable, and a use-case why this is needed, so we can take it into consideration when planning the UI changes (or at least making it accessible via "unsupported" means, like the lima.yaml file).

@dee-kryvenko
Copy link
Author

Ok let's leave this ticket for a lima.yaml alone - I will open a separate one for k3s stuff explaining my use case.

For Lima config - I need to set custom DNS since I am using AnyConnect to the corporate VPN and it is using split DNS Lima is not automatically picking up (we just had this discussion in lima-vm/lima#270).

Additionally, I need to be able to set writable: true for my user home directory. People used to run stuff like docker run -it --rm -v $(cd && pwd)/.jenkins:/var/jenkins_home -p 8080:8080 jenkins/jenkins or any other tool intentionally mounting stuff into the container. I am creator of a tool https:/plumber-cd/runtainer that was automating some boilerplate to automatically discover the mounts, and it was recently just a wrapper for docker cli and now I am trying to make it portable by making it use local k8s and hostPath volumes. For this to work - I need to be able set writable: true. I perfectly understand why it is disabled by default and I think it should be.

Maybe it would be a good idea to expose Lima config in Rancher Desktop UI.

@jandubois
Copy link
Member

Maybe it would be a good idea to expose Lima config in Rancher Desktop UI.

This is definitely the plan. Probably no all the config, but those that we have use cases for, e.g.

  • mount points
  • dns & proxy settings
  • registries
  • certificates

That's why I'm always asking people to file issues with their use cases, so we can include them in our considerations.

@dee-kryvenko
Copy link
Author

Perfect, thank you! I just created #702 to explain k3s/coredns side of this issue.

@gaktive gaktive added kind/documentation-ready Improvements or additions to documentation kind/enhancement New feature or request labels Jan 3, 2022
@gaktive gaktive added this to the v1.0.0-beta milestone Jan 3, 2022
@gaktive gaktive modified the milestones: v1.0.0-beta, v1.0.0 Jan 7, 2022
@gaktive gaktive removed this from the v1.0.0 milestone Jan 15, 2022
@jtravee jtravee added kind/documentation-devhelp For work that needs documenting but requires an engineer to help docs and removed kind/documentation-ready Improvements or additions to documentation labels Feb 23, 2022
@marcinkubica
Copy link

marcinkubica commented Apr 22, 2022

Hi,
Just pointing out that having the ability to provide user lima.yaml can help folks struggling on M1 Apples to just use x86 emulation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation-devhelp For work that needs documenting but requires an engineer to help docs kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants