← Back
Mischa Vandenburg May 24, 2024 22m

Updating to Flux 2.3 GA - Kubernetes Homelab

Read full transcript 15 segments
  1. hi there my name is Misha I'm a hi there my name is Misha I'm a Microsoft MVP and today I'm going to Microsoft MVP and today I'm going to Microsoft MVP and today I'm going to check out the new flux 2.3 update uh I'm check out the new flux 2.3 update uh I'm check out the new flux 2.3 update uh I'm not going to go through the entirety of not going to go through the entirety of not going to go through the entirety of the the release notes I am basically the the release notes I am basically the the release notes I am basically just going to do the upgrade in my um just going to do the upgrade in my um just going to do the upgrade in my um production home lab cluster uh in my production home lab cluster uh in my production home lab cluster uh in my cluster I have in my code I have a cluster I have in my code I have a cluster I have in my code I have a GitHub actions GitHub actions GitHub actions workflow and this runs every night and workflow and this runs every night and workflow and this runs every night and it basically checks out my entire repo it basically checks out my entire repo it basically checks out my entire repo and it reruns the flux install command and it reruns the flux install command and it reruns the flux install command so it just basically regenerates the so it just basically regenerates the so it just basically regenerates the entire all of the manifests for my entire all of the manifests for my entire all of the manifests for my kubernetes cluster kubernetes cluster kubernetes cluster and after that it will create a pull and after that it will create a pull and after that it will create a pull request so in my lab repo I now have a request so in my lab repo I now have a request so in my lab repo I now have a pool request and I have some more from pool request and I have some more from pool request and I have some more from renovate but here is this get up actions renovate but here is this get up actions renovate but here is this get up actions bot where it upgrades my flux to version bot where it upgrades my flux to version bot where it upgrades my flux to version 2.3 now the thing is that it it there 2.3 now the thing is that it it there 2.3 now the thing is that it it there are so many changes probably due to WID are so many changes probably due to WID are so many changes probably due to WID space that I space that I space that I actually um cannot show the diff at all actually um cannot show the diff at all actually um cannot show the diff at all unfortunately but I I assume that there unfortunately but I I assume that there unfortunately but I I assume that there is a bunch of wide space that is just is a bunch of wide space that is just is a bunch of wide space that is just changing and I um I was reading through changing and I um I was reading through changing and I um I was reading through the the release notes Here There are the the release notes Here There are the the release notes Here There are some interesting things here and maybe some interesting things here and maybe some interesting things here and maybe I'll do another video where I just go I'll do another video where I just go I'll do another video where I just go through this in in through this in in through this in in detail uh but there are a few breaking detail uh but there are a few breaking detail uh but there are a few breaking changes here

  2. changes here changes here and let's see here it it um it talks and let's see here it it um it talks and let's see here it it um it talks about installing or upgrading flux so to about installing or upgrading flux so to about installing or upgrading flux so to upgrade flux from 2 to 2.3 either rerun upgrade flux from 2 to 2.3 either rerun upgrade flux from 2 to 2.3 either rerun flux bootstrap or use the flux G up flux bootstrap or use the flux G up flux bootstrap or use the flux G up action so that is the one that I used action so that is the one that I used action so that is the one that I used right this is right this is right this is um here oh wow this is a new one oh I here oh wow this is a new one oh I didn't know that I the get up action didn't know that I the get up action didn't know that I the get up action that I use is oh no no I I am using this one flux 2 is oh no no I I am using this one flux 2 Action Action Action main flux 2 Action main yeah okay so main flux 2 Action main yeah okay so main flux 2 Action main yeah okay so this is the G of action that I'm using this is the G of action that I'm using this is the G of action that I'm using so um in the upgrade so um in the upgrade so um in the upgrade guide um to upgrade the apis in a guide um to upgrade the apis in a guide um to upgrade the apis in a manifest stored in git so before manifest stored in git so before manifest stored in git so before upgrading Ure the helm release V2 beta upgrading Ure the helm release V2 beta upgrading Ure the helm release V2 beta yaml manifests are not using deprecated yaml manifests are not using deprecated yaml manifests are not using deprecated fields and let's see if I am in my repo fields and let's see if I am in my repo fields and let's see if I am in my repo and if I then search and if I then search and if I then search for let me see values see values file maybe it's better to grab so grab file maybe it's better to grab so grab file maybe it's better to grab so grab um values um values um values file so here we see that in in the flux file so here we see that in in the flux file so here we see that in in the flux manifest there is actually a

  3. manifest there is actually a manifest there is actually a deprecated deprecated deprecated um parameter here but since those are in um parameter here but since those are in um parameter here but since those are in the flux manifest I assume those are the flux manifest I assume those are the flux manifest I assume those are going to be updated by the up update going to be updated by the up update going to be updated by the up update command that we did or that we're going command that we did or that we're going command that we did or that we're going to do let's see to do let's see to do let's see patches patches Json 902 imp patches strategic merge those are imp patches strategic merge those are all again in the in the flux manifest so yeah these are all in the flux so yeah these are all in the flux manifest so I assume this all all of manifest so I assume this all all of manifest so I assume this all all of this is going to be handled by the flux this is going to be handled by the flux this is going to be handled by the flux install command and let's see update the API command and let's see update the API version field of the helm release version field of the helm release version field of the helm release resources to helm toolkit flux CD io2 resources to helm toolkit flux CD io2 resources to helm toolkit flux CD io2 okay so that I will need okay so that I will need okay so that I will need to um Helm release for example here there is a Helm release for example here there is a Helm release and then okay so these Helm release and then okay so these Helm release and then okay so these Helm releases this one has a V1 bet. 2 that releases this one has a V1 bet. 2 that releases this one has a V1 bet. 2 that will need to be upgraded to will need to be upgraded to will need to be upgraded to V2 and then Helm repository as well okay V2 and then Helm repository as well okay V2 and then Helm repository as well okay so there are a few changes that I need so there are a few changes that I need so there are a few changes that I need to

  4. do so yeah I think I'm just going to go do so yeah I think I'm just going to go for it uh I will merge the for it uh I will merge the for it uh I will merge the pr uh let's pr uh let's pr uh let's see here oh here so we can see the div here oh here so we can see the div actually okay so what what is it doing actually okay so what what is it doing actually okay so what what is it doing so so so it is uh upgrading the ver all of the it is uh upgrading the ver all of the it is uh upgrading the ver all of the images here and it's just version here and it's just version upgrades then here it is updating upgrades then here it is updating upgrades then here it is updating descriptions descriptions descriptions mhm yeah okay but since it's saying here mhm yeah okay but since it's saying here mhm yeah okay but since it's saying here this manifest was generated by flux do this manifest was generated by flux do this manifest was generated by flux do not addit I think I don't need to worry not addit I think I don't need to worry not addit I think I don't need to worry about this so what I'm going to do is about this so what I'm going to do is about this so what I'm going to do is I'm going to close this open close this open [Music] K9s K9s and go to my pods and then I sort by age and go to my pods and then I sort by age and go to my pods and then I sort by age so now we see all of the pods that are so now we see all of the pods that are so now we see all of the pods that are running and I am going to merge the pool so I can delete the branch so I can delete the branch now and if I go now and if I go now and if I go [Music]

  5. to um let's to um let's see flux get customizations we see it is still in a customizations we see it is still in a ready ready ready State let's move this State let's move this State let's move this away flux watch so now it's it should soon start watch so now it's it should soon start to uh upgrade this was this was [Music] [Music] [Music] merged here we go now we get some uh merged here we go now we get some uh merged here we go now we get some uh some things some things some things happening so all of these pods are now okay looks like everything is uh running okay looks like everything is uh running so this I do this by fgk that's an alias

  6. so this I do this by fgk that's an alias so this I do this by fgk that's an alias that I have for flux get that I have for flux get that I have for flux get customizations so everything seems to be customizations so everything seems to be customizations so everything seems to be up and running and working well so then up and running and working well so then up and running and working well so then all we need to all we need to all we need to do is to uh do is to uh do is to uh um update the the other resources um update the the other resources um update the the other resources so still looking good and flux logs no changes since last logs no changes since last reconciliation all the pendencies are reconciliation all the pendencies are reconciliation all the pendencies are ready so it looks it's looking pretty ready so it looks it's looking pretty ready so it looks it's looking pretty good cool well that was that and then I good cool well that was that and then I good cool well that was that and then I can uh go through these changes that can uh go through these changes that can uh go through these changes that were in the upgrade were in the upgrade were in the upgrade guide so let's see we check those and so let's see we check those and now update the API version field of the now update the API version field of the now update the API version field of the helm release resources to helm toolkit helm release resources to helm toolkit helm release resources to helm toolkit flux flux flux CV2 so release okay those release okay those are quite a lot

  7. lot so what I'm going to do then is I have this then is I have this text and I have a script that's called bulk bulk replace and this will search through yep replace and this will search through yep replace and this will search through yep search through files and then do a um search through files and then do a um search through files and then do a um search and search and search and replace replace replace so this needs to be replaced this needs to be replaced with oops that and that needs to that and that needs to be Helm toolkit flux CD V2 so if I then go to my repo V2 so if I then go to my repo again I have no again I have no again I have no changes uh changes uh changes uh currently if I then run the bulk replace

  8. um ah okay it needs um ah okay it needs to do it on yaml files let's see there's something wrong with let's see there's something wrong with my expression so expression one Char 46 unknown option so expression one Char 46 unknown option to GPT running this on Mac OS

  9. GPT running this on Mac OS gives this error yeah it's the forward slashes I error yeah it's the forward slashes I thought so so um you can use a different delimiter to um you can use a different delimiter to um you can use a different delimiter to avoid this issue just probably need just probably need to escape this forward slash yeah here we go that was it so um slash yeah here we go that was it so um get diff let's see what that get diff let's see what that get diff let's see what that did okay so here we see that then um I did okay so here we see that then um I did okay so here we see that then um I have now a commit where it will take the have now a commit where it will take the have now a commit where it will take the SE manager release at yaml for example SE manager release at yaml for example SE manager release at yaml for example and remove the beta from and remove the beta from and remove the beta from it and we have the CSI Secret store it and we have the CSI Secret store it and we have the CSI Secret store provider the EDB operator all of these provider the EDB operator all of these provider the EDB operator all of these have now uh the helm release API okay so let's go through it in lazy git

  10. okay so let's go through it in lazy git so it's inert manager EDB operator traffic yeah all of the helm Helm traffic yeah all of the helm Helm controllers have now stripped the beta controllers have now stripped the beta controllers have now stripped the beta so I will do so I will do so I will do feed um update Helm release feed um update Helm release feed um update Helm release tov2 and push that and I'm going to do this commit by that and I'm going to do this commit by commit so then I can monitor whether commit so then I can monitor whether commit so then I can monitor whether everything is going well because now it everything is going well because now it everything is going well because now it should should should not it should not start redeploying see okay yeah so now it's reconciling see okay yeah so now it's reconciling and now I'm wondering if it is going to and now I'm wondering if it is going to and now I'm wondering if it is going to do any do any do any redeployments but probably not it's just the API version of the

  11. not it's just the API version of the helm release it shouldn't trigger a helm release it shouldn't trigger a helm release it shouldn't trigger a redeployment of things we're getting an unknown reconciliation we're getting an unknown reconciliation in progress yep here we go now it's doing progress yep here we go now it's doing the apps so it is not redeploying the apps so it is not redeploying the apps so it is not redeploying anything it is just updating the apis in anything it is just updating the apis in anything it is just updating the apis in the kubernetes the kubernetes the kubernetes manifests great so then the next one one manifests great so then the next one one manifests great so then the next one one is going to be be um update the API version of the field um update the API version of the field um update the API version of the field Helm repository Helm repository Helm repository resource to resource to resource to this so let's check out um out um repository that's quite a large list but it seems like I have but it seems like I have already oh no here we go Helm repository already oh no here we go Helm repository already oh no here we go Helm repository this is V1 this is V1 this is V1 beta so we are going to take this and

  12. beta so we are going to take this and beta so we are going to take this and then we're going to go to our script this and then it's just going to be V1 this and then it's just going to be V1 so we're just removing the beta everything is looking good so bulk everything is looking good so bulk replace replace replace again and now we see that all of these again and now we see that all of these again and now we see that all of these Helm updated oh it's actually recommending to updated oh it's actually recommending to do all of these and push the changes in do all of these and push the changes in do all of these and push the changes in one go so maybe I should just do that one go so maybe I should just do that one go so maybe I should just do that then so then so then so those are all updated and then updated and then finally the next one is going to be image update automation resources I

  13. be image update automation resources I think I have only one or two of um image update automation yeah I have um image update automation yeah I have only one of those and those need to go only one of those and those need to go only one of those and those need to go to V1 beta 2 2 so that's so that's so that's that and then I can commit this feed that and then I can commit this feed that and then I can commit this feed update Helm repo to 2 push 2 push that and then all of this is going to that and then all of this is going to that and then all of this is going to reconcile and then my flux upgrade reconcile and then my flux upgrade reconcile and then my flux upgrade should be should be should be done like flux is such a pleasure to done like flux is such a pleasure to done like flux is such a pleasure to work with I I love flux I I prefer I work with I I love flux I I prefer I work with I I love flux I I prefer I much prefer this over Argo CD so much prefer this over Argo CD so much prefer this over Argo CD so far because it is so nice to do far because it is so nice to do far because it is so nice to do everything from the CLI it forces you to everything from the CLI it forces you to everything from the CLI it forces you to think about the the git code much more think about the the git code much more think about the the git code much more than um I found when I was using Argo than um I found when I was using Argo than um I found when I was using Argo CD and I am I'm just super stoked about CD and I am I'm just super stoked about CD and I am I'm just super stoked about this project and I would love love to this project and I would love love to this project and I would love love to work more with this unfortunately I I work more with this unfortunately I I work more with this unfortunately I I don't but I'm I started as a freelancer

  14. don't but I'm I started as a freelancer don't but I'm I started as a freelancer and now I can really pick the the and now I can really pick the the and now I can really pick the the assignments that I wish to do and doing assignments that I wish to do and doing assignments that I wish to do and doing a a flux assignment will be amazing the fux customization it is now the fux customization it is now reconciling and I think when the reconciling and I think when the reconciling and I think when the reconciliation is finished then uh I can reconciliation is finished then uh I can reconciliation is finished then uh I can consider this upgrade to be successful yep it's just still going and successful yep it's just still going and is there like a flux [Music] [Music] events reconciliation good yep everything is finished good yep everything is finished everything is working well and as you everything is working well and as you everything is working well and as you can see when I sort by AG you see that can see when I sort by AG you see that can see when I sort by AG you see that no pods have been restarted so you can no pods have been restarted so you can no pods have been restarted so you can just save ly use the GitHub actions you just save ly use the GitHub actions you just save ly use the GitHub actions you can find it in my my GitHub repo you can can find it in my my GitHub repo you can can find it in my my GitHub repo you can just merge the pr and it will um do the just merge the pr and it will um do the just merge the pr and it will um do the upgrade for you uh I highly recommend upgrade for you uh I highly recommend upgrade for you uh I highly recommend using the flux giup actions instead of using the flux giup actions instead of using the flux giup actions instead of using um

  15. using um using um renovate which is what I have here I'm renovate which is what I have here I'm renovate which is what I have here I'm going to close this because I don't want going to close this because I don't want going to close this because I don't want renovate to be handling this renovate to be handling this renovate to be handling this and because I've that renovate is and because I've that renovate is and because I've that renovate is constantly updating all of these images constantly updating all of these images constantly updating all of these images but those might not necessarily be ready but those might not necessarily be ready but those might not necessarily be ready for deployment so use the flux get up for deployment so use the flux get up for deployment so use the flux get up actions that we that we showed you this actions that we that we showed you this actions that we that we showed you this one and use this one for upgrading your one and use this one for upgrading your one and use this one for upgrading your cluster automatically and it just works cluster automatically and it just works cluster automatically and it just works super well so now my upgrade has been super well so now my upgrade has been super well so now my upgrade has been completed and thank you so much for completed and thank you so much for completed and thank you so much for watching if you like this stuff please watching if you like this stuff please watching if you like this stuff please subscribe to my channel it really helps subscribe to my channel it really helps subscribe to my channel it really helps me

Summary

The video demonstrates upgrading Flux to version 2.3 in a home lab cluster using a GitHub Actions workflow. Key subjects include Flux, GitHub Actions, and the importance of checking for deprecated fields in Helm release manifests. The practical takeaway is that the Flux upgrade can be performed via `flux bootstrap` or the `flux` GitHub Action, and users should verify their manifests to avoid issues with deprecated parameters.

View original episode ↗