Instructions on how to upgrade:
https://github.com/flannel-io/flannel/blob/master/Documentation/upgrade.md
To follow that approach one just needs to have a definition of the current version of flannel and the new one. kubectl delete -f .yaml and kubectl create -f .yaml will do the thing
The instructions on how to install flannel always installs the latest version of the manifests so we need to backtrack and find what we have actuall installed.
We need new versions of
kube-flannel.yml
(this is the linux flannel)flannel-overlay.yml
(this is the windows flannel)
Linux: Use history to find the latest version of this file that has the version of flannel you are installing: https://github.com/flannel-io/flannel/blob/master/Documentation/kube-flannel.yml. For example for 0.14.0 it is this version: https://github.com/flannel-io/flannel/blob/584c19aebe302db6318e2063e1359a78a63a4ecf/Documentation/kube-flannel.yml
Windows: Make sure flannel-overlay.yml is using hostprocess and not the old wins with script version. At the time of writing this was located here: https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/hostprocess/flannel/flanneld/flannel-overlay.yml
IMPORTANT: After we get the new files we need to patch them
According to instructions here the linux file must be patched:
Need to change this in kube-flannel.yml (linux):
net-conf.json: |
{
"Network": "10.244.0.0/16",
"Backend": {
"Type": "vxlan",
"VNI": 4096,
"Port": 4789
}
}
No patch is needed for hostprocess.
So we need the original files that were installed, and the new files with patches from above, and then run this:
kubectl delete -f original/flannel-overlay.yml
kubectl delete -f original/kube-flannel.yml
# wait a bit
kubectl apply -f new/kube-flannel.yml
kubectl delete -f new/flannel-overlay.yml