-
Notifications
You must be signed in to change notification settings - Fork 701
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
add support for the OpenRC as init system #1295
Comments
Please first fix warnings that kubeadm is providing to you. E.g. start with defining proper value for NO_PROXY environment variable, then make sure that all needed binaries are present on the system (tc,ebtables,...) and then check what is in kubelet's status and logs. |
/assign |
With all warnings apart from not having a supported init system detected. Still has the same issue.
|
Also not supporting the init system(openrc) is totally understandable, maybe an improvement here is just some documentation of the supported init systems (or just saying that it only supports systemd if that's the case) |
Can you share what is in the logs for kubelet and in docker containers (if any are running after kubeadm error messages) |
Hi kad, as far as I can tell there is no kubelet process running, and no containers are ever started. I know little about kubeadms internals, but it appears it wants to configure a service at the beginning (eg systemd), can't find a supported init system, so skips it, but later on is waiting for that init system to have started the kubelet.
|
only support systemd and wininit init system. you could install kubelet manually and delete the code installing kubelet configuration file in kubeadm, mybe it works |
is alpine linux a target for us? |
Alpine Linux is a very popular target for containers - due to it's extremely small size/install - also rather popular for Vagrant/EC2 - I'm surprised it's not supported. Grepped through the kubedm code - seems like it's just messing with systemd in order to start docker/kubernetes stuff. Is there a document describing what kubeadm does / intends to do / depends upon from the init system? |
on Linux it uses systemd to start / stop the kubelet: this document partially outlines the kubeadm / systemd interaction: https://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System
this init system is not supported by core kubernetes.
this comes from here: |
/assign @timothysc @detiber |
Has someone already packaged the necessary binaries (and the required init scripts) for Alpine? If so, I don't see an issue with adding proper support for managing services correctly. If not, then I would consider that a prerequisite for this to proceed, since the management of init scripts/config isn't the responsibility of kubeadm. |
There seems to be a single kubernetes package here. |
@rosti Looking at the contents of that package it basically looks like a dump of multiple k8s binaries and does not include an init script or config required to be driven by kubeadm. |
I'm normally a lurker. But there's industry interest in Kubernetes on the Edge using ARM and various bare metal options are being investigated with Alpine being in the mix of OS choices. I think OpenRC support in kubeadm is kind of a must-have, I'm not certain Alpine's community is going to put forward a patch that 'fixes' something so fundamental to the OS's claim to fame. |
I strongly suspect you are correct - with the memory/image size they're targeting - I really can't see them going the (no disrespect to) systemd route. |
At first glance, this actually looks quite straight-forward. I'm not a Go-afficionado by any means, but it appears to just be making direct calls to a shell. Adding another implementor to that InitSystem interface that works for OpenRC plus the openrc service script would probably do it. EDIT: |
@detiber you are correct there. But some package is better than no package. This means that we have a maintainer we can ping with a specific proposal. |
marked as active as @oz123 mentioned that he can look at followup changes. |
Since above PR mentions partial support, what is currently missing for full support @oz123 ? |
@mrueg what's missing is almost everything we discussed in this thread. I currently lack the time to complete the work, if someone would like to sponsor it feel free to contact me. If another person wants to take over this work I am also fine with that. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
this is a pending openrc issue: #1986 |
unable to run on alpine as well :( |
I am using k8s on Alpine (a single cluster running on x86_64, armv7 and aarch64) as a work around when joining a node to a cluster I manually restart kubelet when it fails, seems to only be needed to be done once. |
I managed to start a cluster the other day with some help from @neolit123 .
Furthermore, to complete this I need some co-operation from @fcolista to fix the alpine side of things. I already contacted you but got no response. Otherwise everything from |
@xphoniex I'm avail to help. |
These PRs on alpine side are needed, leaving them here for reference: And that's it. |
@xphoniex they have been merged |
we can close this too now that kubernetes/kubernetes#90892 is merged @neolit123 , yes? |
i think this is the final remaining item: |
Alpine already uses We only had to update the flags in Notice for example that we made |
understood, this is great news and i'm going to close this ticket (finally). a couple of FYI WRT service files:
|
@neolit123: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
EDIT by neolit123:
the init system is already supported yet kubeadm still is assuming systemd in paths and messages:
see:
#1295 (comment)
also see this workaround:
#1295 (comment)
BUG REPORT
Looks like alpine linux init system isn't supported by kubeadm.
It seems to write messages about this and continue on, but I assume it doesn't configure a service,
thus it never starts, and can't finish.
Would be awesome if we could host a kubernetes cluster on alpine.
Versions
kubeadm version (use
kubeadm version
):kubeadm version: &version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"archive", BuildDate:"2018-11-15T16:26:01Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Environment:
Kubernetes version (use
kubectl version
):Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"archive", BuildDate:"2018-11-15T16:26:01Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Cloud provider or hardware configuration:
HyperV on windows
OS (e.g. from /etc/os-release):
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.8.1
PRETTY_NAME="Alpine Linux v3.8"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
Kernel (e.g.
uname -a
):Linux kubemanager1 4.14.84-0-virt kubeadm join on slave node fails preflight checks #1-Alpine SMP Thu Nov 29 10:58:53 UTC 2018 x86_64 Linux
Others:
What happened?
kubeadm init
failed to start a kubelet thus failed to runWhat you expected to happen?
kubeadm to init correctly
How to reproduce it (as minimally and precisely as possible)?
kubeadm init
Anything else we need to know?
docker ps -a
returns nothing. No container was ever startedThe text was updated successfully, but these errors were encountered: