Skip to content

fix(systemd/network): exclude node* and kube* from dhcp by default #89

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

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

maxime1907
Copy link
Contributor

[systemd/network: exclude node* and kube* from dhcp by default]

Currently, when using kubeadm join, it says that the command works but sometimes it fails because the container nodelocaldns creates a dummy interface called nodelocaldns by default and systemd-networkd manages it with the default file zz-default.network that adds DHCP and IPV6RA support.

So when nodelocaldns tries to do an equivalent of ip addr add, the command works but it will silently fail because the interface is managed by two different programs (systemd-networkd and nodelocaldns)

How to use

Check that the interfaces created by kube-proxy and nodelocaldns are not managed by systemd-networkd with the command networkctl.

Check that kubeadm join properly works so the node can join the cluster by setting its default nodelocaldns interface to the IPs defined with -localip in the node-cache container.

Testing done

Checked that everything in How to use works

@maxime1907
Copy link
Contributor Author

cc @pothos @krnowak

@maxime1907 maxime1907 force-pushed the fix-kube branch 2 times, most recently from a664125 to 939b1ce Compare February 16, 2023 10:47
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
@pothos pothos merged commit c977678 into flatcar:flatcar-master Feb 20, 2023
@pothos
Copy link
Member

pothos commented Feb 20, 2023

Thanks

pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Feb 20, 2023
This pulls in
flatcar/init#89
to set the Kubernetes interfaces nodelocaldns and kube-ipvs0 as
Unmanaged in networkd to prevent configuration conflicts.
@pothos
Copy link
Member

pothos commented Feb 20, 2023

I actually had excluded dummy devices from being managed by default. Have to check why this is not working: https://github.com/flatcar/init/blob/flatcar-master/systemd/network/zz-default.network#L8

@pothos
Copy link
Member

pothos commented Feb 20, 2023

Ah, Type vs Driver!

@pothos
Copy link
Member

pothos commented Feb 20, 2023

Fix prepared in #90

We can still keep your changes, we also have this for other similar cases and these are probably the ones we would backport. I still would love to see Kubernetes to provide the unit itself in /run/systemd/network/ instead of forcing distros and users to take care of this.

pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Feb 21, 2023
This pulls in
flatcar/init#89
to set the Kubernetes interfaces nodelocaldns and kube-ipvs0 as
Unmanaged in networkd to prevent configuration conflicts.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Feb 21, 2023
This pulls in
flatcar/init#89
to set the Kubernetes interfaces nodelocaldns and kube-ipvs0 as
Unmanaged in networkd to prevent configuration conflicts.
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request Feb 21, 2023
This pulls in
flatcar/init#89
to set the Kubernetes interfaces nodelocaldns and kube-ipvs0 as
Unmanaged in networkd to prevent configuration conflicts.
t-lo pushed a commit to flatcar/scripts that referenced this pull request Apr 13, 2023
This pulls in
flatcar/init#89
to set the Kubernetes interfaces nodelocaldns and kube-ipvs0 as
Unmanaged in networkd to prevent configuration conflicts.
t-lo pushed a commit to flatcar/scripts that referenced this pull request Apr 17, 2023
This pulls in
flatcar/init#89
to set the Kubernetes interfaces nodelocaldns and kube-ipvs0 as
Unmanaged in networkd to prevent configuration conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants