microk8s
microk8s copied to clipboard
[1.27-strict] microk8s snap doesn't cleanup network calico net interfaces, and leaks them too
Summary
According to this microk8s doc page, microk8s uses:
Starting from version 1.19, MicroK8s clusters use the Calico CNI by default, configured with the vxlan backend.
That said, I think this is only used as the default on a machine that for which you've run add-node
(and possible join-node
too). I may have done this recently while testing at a sprint.
The problem is that once this has been done once, the vxlan.calico
network interface and associated caliXXXX
ethernet interfaces are not deleted if the microk8s snap is removed. If you re-install the snap, a new pair of caliXXXX
eth interface get created (I now have 21 on my system). The number increases by two every time you remove and then re-install the snap.
Snap version: v1.27.3 5590 (arm64)
What Should Happen Instead?
When the microk8s snap is removed, it should clean up any network interfaces that it created.
Reproduction Steps
I've been able to reproduce this consistently on one machine running 22.04 LTS Desktop, but haven't reproduced it on another machine yet (see above comment about add-node
command). I will try again when I have more bandwidth, and will update the issue with my findings.
- Run
microk8s add-node
(again I think this is what got me here) - Run
ipaddr
ornmcli d
and notice thevxlan.calico
andcaliXXXX
interface(s) -
sudo snap remove microk8s --purge
- Check the network interfaces using the above command, notice that they're still there.
- Re-install the microk8s snap (1.27-strict)
- Re-check the network interfaces and see that there are now two more
caliXXX
interfaces
Introspection Report
inspection-report-20230803_181941.tar.gz