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

Run the master without kubelet #1943

Closed
toonsevrin opened this issue Jun 23, 2020 · 10 comments
Closed

Run the master without kubelet #1943

toonsevrin opened this issue Jun 23, 2020 · 10 comments

Comments

@toonsevrin
Copy link

Is it possible to run the master without the kubelet? I'd like to do k3s-in-k3s (eg. one cluster manages the other master), but I can't see to figure out how to disable the kubelet on the master nodes.

@brandond
Copy link
Member

I haven't tested it myself, but there's a hidden option for that:

https://github.com/rancher/k3s/blob/master/pkg/cli/cmds/server.go#L302

@toonsevrin
Copy link
Author

toonsevrin commented Jun 23, 2020

@brandond that does the job! Memory usage is still 375 Mb on a 1-node master (without any configuration) 😮

Any way to cut this down (ideally to <100MB RAM)?

@brandond
Copy link
Member

If you can find a way to run the entire Kubernetes control plane plus datastore in less than 100mb, I think that would be newsworthy ;)

@toonsevrin
Copy link
Author

Agreed, anyways, I've started a separate issue for this: #1944. Target is 150-200MB.

@brandond
Copy link
Member

I have personally tried running it with as little as 256M, but it gets OOM killed pretty quick. at 384M it runs but doesn't perform well. As far as I can tell it should really have at least 512M.

@SOF3
Copy link

SOF3 commented Dec 27, 2022

I haven't tested it myself, but there's a hidden option for that:

https://github.com/rancher/k3s/blob/master/pkg/cli/cmds/server.go#L302

link is obsolete, which line are you actually referring to?

Edit: it seems to be --disable-agent

k3s/pkg/cli/cmds/server.go

Lines 523 to 528 in fae8817

cli.BoolFlag{
Name: "disable-agent",
Usage: "Do not run a local agent and register a local kubelet",
Hidden: true,
Destination: &ServerConfig.DisableAgent,
},

But why is this hidden?

@brandond
Copy link
Member

Because we don't technically support it. Many operators (system upgrade controller, etcd controller, and others) assume that the control-plane hosts will have nodes that can be used to track operations.

@ghost
Copy link

ghost commented Dec 27, 2022

Much thanks @FabianKramm at Loft.sh for keeping the flag functional, ref: #4873 and #5118

It was definitely broken for a few versions, but has been fixed since this issue was originally created. When it was initially fixed, I don't think that the fix was propagated back to older releases. Not sure of the current state today as it shouldn't matter as older releases are obsoleted.

@brandond
Copy link
Member

brandond commented Dec 27, 2022

Well I was the one that fixed both of those, but yes thanks to everyone for reporting issues.

Both of those fixes were backported to the branches that were active at the time the issue was resolved.

@ghost
Copy link

ghost commented Dec 27, 2022

I definitely misremembered that. Much thanks to you @brandond. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants