Closed emosbaugh closed 8 months ago
I've filed a kubernetes issue as well as I'm not familiar enough with the interface to know where the responsibility lies.
The issue seems related to the flannel binaries been deleted. It seems strange that updating kubernetes-cni
all the binaries are deleted. This could be an issue also for other CNI.
The reason for this was that in 0.8.6, the "flannel" binary was included in the package:
be46c745d8bcb0517640385e031290d6 ./opt/cni/bin/flannel
CNI flannel plugin v0.8.6
Then the kubernetes project accidentally repackaged that old version, labelling it as 1.1.1
kubernetes-cni_1.1.1-00_amd64.deb
cni-plugins-linux-amd64-v0.8.6.tgz
This k8s packaging bug was finally fixed, removing the flannel plugin, starting with 1.2.0
It is now supposed to be installed to the host by the init container (install-cni-plugin
).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Expected Behavior
Upgrading kubelet and kubernetes should not put the cluster in a bad state.
Current Behavior
If I install kubernetes and kubelet and then later upgrade to a version that upgrades kubernetes-cni package as a subdependency, the /opt/cni/bin directory gets overwritten and the flannel binary is removed. It does not get recreated as this happens in an initContainer.
All pods get stuck in a ContainerCreating state as CNI operations fail.
Possible Solution
It is possible to work around this issue by deleting the flannel pod so that the init container is run.
Steps to Reproduce (for bugs)
I've created the following script to reproduce.
https://gist.github.com/emosbaugh/05f340c2a48b4ab3b2e797ce11b38b74
Running this script produces output:
Context
Your Environment