flannel icon indicating copy to clipboard operation
flannel copied to clipboard

Upgrade flannel on kubernetes cluster

Open michaelschefczyk opened this issue 4 years ago • 6 comments

Dear All,

In a debian buster kubernetes 1.20.1 cluster, I thought it might be a good idea to consider upgrading not only kubernetes but possibly also flannel. Hence, I ran

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

once again. Now, I have both:

  • quay.io/coreos/flannel v0.13.1-rc1 f03a23d55e57
  • quay.io/coreos/flannel v0.12.0-amd64 4e9f801d2217

Both images are running and I have no clue (a) how to permanently stop one of the images and (b) if this would be on the right path do avioid duplications without creating addtional problems. I did look through all relevant daemonsets in all namespaces, for example. Nevertheless, I did not find anything to stop in order to really roll over to flannel v.0.13 (would have prepared to get stable instead of rc1 - but that would be another issue).

Can someone please point me to the right direction?

Thanks & Regards,

Michael Schefczyk

michaelschefczyk avatar Dec 24 '20 23:12 michaelschefczyk

For the time being, I did execute

kubectl delete daemonset kube-flannel-ds --namespace=kube-system

Then, only flannel 0.12.0 is running and I could delete the 0.13.1-rc1 image.

Nevertheless it would be good to know how to update, ideally to a stable version of choice.

michaelschefczyk avatar Dec 25 '20 11:12 michaelschefczyk

needs documentation updates and probably will switch to a helm chart installation/uninstallation process.

luthermonson avatar Jan 07 '21 16:01 luthermonson

Any suggestions on the upgrade process here? Should we deploy kube-flannel-ds (v0.13.0) alongside the already running kube-flannel-ds-amd64 (v0.12.0), and then delete kube-flannel-ds-amd64? Is there a better approach?

blachniet avatar Jun 17 '21 19:06 blachniet

Any update on how to correcty update flannel in an existing cluster?

ckazimie avatar Oct 16 '21 07:10 ckazimie

Hi,

I did not find any information so i YOLO'D it on three production nodes, where 2 are clustered.

I will share my results for the next searcher

Host # 1, "the solo host" from: flannel:v0.13.1-rc1 to flannel:v0.15.1 Kubever: v1.20.2 OS: ubuntu server 18.04.03

Host #2 and #3, "the cluster" from: flannel:v0.11.1-rc1 to flannel:v0.15.1 Kubever: v1.20.5 OS: ubuntu server 18.04.06

The procedure for the solo node

  1. kubectl delete daemonset kube-flannel-ds --namespace=kube-system
  2. kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
  3. Restart host
  4. Hope for the best

The procedure for the clustered

  1. kubectl drain slave-node
  2. run steps from "solo node"-procedure but also deleting daemonsets without any pods image
  3. kubectl uncordon slave-node

And all my deployments, pods, services etc are working.

@ckazimie

tarreislam avatar Nov 15 '21 15:11 tarreislam

Hi,

In the Documentation there is a file explaining the two procedures for upgrade/downgrade flannel https://github.com/flannel-io/flannel/blob/master/Documentation/upgrade.md

gusmenp avatar Aug 28 '22 20:08 gusmenp

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.

stale[bot] avatar Feb 24 '23 20:02 stale[bot]