The GitOps Way to Run Your Kubernetes Homelab in 2025
Read full transcript 22 segments
-
if you haven't worked with gitops yet if you haven't worked with gitops yet you are falling behind but don't worry you are falling behind but don't worry you are falling behind but don't worry I'm here to help you in this video I'm I'm here to help you in this video I'm I'm here to help you in this video I'm sharing something really special it's a sharing something really special it's a sharing something really special it's a full module from my premium kubernetes full module from my premium kubernetes full module from my premium kubernetes hom lab course completely for free what hom lab course completely for free what hom lab course completely for free what you're about to learn isn't just Theory you're about to learn isn't just Theory you're about to learn isn't just Theory it's the exact same workflow I use to it's the exact same workflow I use to it's the exact same workflow I use to manage my production systems and which manage my production systems and which manage my production systems and which is being adopted by Enterprises is being adopted by Enterprises is being adopted by Enterprises worldwide in the next 30 minutes I'll worldwide in the next 30 minutes I'll worldwide in the next 30 minutes I'll show you what gitops is how gitops works show you what gitops is how gitops works show you what gitops is how gitops works and the critical differences between and the critical differences between and the critical differences between flux and Argo CD that most tutorials flux and Argo CD that most tutorials flux and Argo CD that most tutorials Miss you're getting the complete uncut Miss you're getting the complete uncut Miss you're getting the complete uncut module the same content that my paid module the same content that my paid module the same content that my paid students receive and it's not a water students receive and it's not a water students receive and it's not a water down version if you find this valuable down version if you find this valuable down version if you find this valuable you love what we do inside the community you love what we do inside the community you love what we do inside the community but for now let's dive into giops and but for now let's dive into giops and but for now let's dive into giops and start learning the tools that will lead start learning the tools that will lead start learning the tools that will lead to your next sixf figure job so now that to your next sixf figure job so now that to your next sixf figure job so now that we've got our kubernetes up and running we've got our kubernetes up and running we've got our kubernetes up and running on a Raspberry Pi we could like create on a Raspberry Pi we could like create on a Raspberry Pi we could like create pods and start deploying things through pods and start deploying things through pods and start deploying things through Cube C and we will but what we want is Cube C and we will but what we want is Cube C and we will but what we want is to do everything through gitops and this to do everything through gitops and this to do everything through gitops and this course is also an introduction to git course is also an introduction to git course is also an introduction to git Ops using flux CD and uh right now I Ops using flux CD and uh right now I Ops using flux CD and uh right now I would like to go a little bit deeper would like to go a little bit deeper would like to go a little bit deeper into what gitops actually is so here I into what gitops actually is so here I into what gitops actually is so here I have open my notes of the gitops have open my notes of the gitops have open my notes of the gitops fundamentals course that I did about fundamentals course that I did about fundamentals course that I did about couple of years ago this is the course couple of years ago this is the course couple of years ago this is the course that is by done by code fresh that is by done by code fresh that is by done by code fresh and in there they have a very and in there they have a very and in there they have a very interesting definition that I want to uh
-
interesting definition that I want to uh interesting definition that I want to uh address so in this course I learned the address so in this course I learned the address so in this course I learned the following definition of gitops gitops is following definition of gitops gitops is following definition of gitops gitops is a set of best practices where the entire a set of best practices where the entire a set of best practices where the entire code delivery process is controlled via code delivery process is controlled via code delivery process is controlled via git including infrastructure and git including infrastructure and git including infrastructure and application definition as code and application definition as code and application definition as code and automation to complete updates and automation to complete updates and automation to complete updates and rollbacks so that is quite a mouthful rollbacks so that is quite a mouthful rollbacks so that is quite a mouthful and let's uh unpack that a little bit and let's uh unpack that a little bit and let's uh unpack that a little bit so giops is a set of best practices so giops is a set of best practices so giops is a set of best practices where the entire code delivery process where the entire code delivery process where the entire code delivery process is controlled via git so let's let's is controlled via git so let's let's is controlled via git so let's let's dive into what that dive into what that dive into what that means so I all in my home lab course means so I all in my home lab course means so I all in my home lab course Misha Misha Misha [Music] [Music] [Music] venur um SL homelab so github.com Misha venur um SL homelab so github.com Misha venur um SL homelab so github.com Misha fenberg homelab fenberg homelab fenberg homelab this is my current home lab as it's this is my current home lab as it's this is my current home lab as it's running in my closet over there this is running in my closet over there this is running in my closet over there this is not my Rasberry Pi cluster this is my not my Rasberry Pi cluster this is my not my Rasberry Pi cluster this is my kubernetes cluster the my actual home kubernetes cluster the my actual home kubernetes cluster the my actual home lab and this is controlled entirely lab and this is controlled entirely lab and this is controlled entirely through through through gitops so this gitops so this gitops so this repository contains kubernetes repository contains kubernetes repository contains kubernetes manifests that are being synced to the manifests that are being synced to the manifests that are being synced to the cluster through an Automation in this cluster through an Automation in this cluster through an Automation in this case flux so if I just just open up a case flux so if I just just open up a case flux so if I just just open up a certain um application for example we
-
certain um application for example we certain um application for example we have melee here this is a customization have melee here this is a customization have melee here this is a customization file that then calls other files that file that then calls other files that file that then calls other files that are in this repository for example the are in this repository for example the are in this repository for example the config the database. yl and this yaml is config the database. yl and this yaml is config the database. yl and this yaml is then being deployed to the cluster by then being deployed to the cluster by then being deployed to the cluster by flux so this is what is meant when it flux so this is what is meant when it flux so this is what is meant when it when they say where the entire code when they say where the entire code when they say where the entire code delivery process is controlled via git delivery process is controlled via git delivery process is controlled via git so let me maybe create a uh drawing so let me maybe create a uh drawing so let me maybe create a uh drawing create create create drawing in a new drawing in a new drawing in a new tab and let's close that one too so now tab and let's close that one too so now tab and let's close that one too so now we will I will just create a new drawing we will I will just create a new drawing we will I will just create a new drawing in dark mode so what we have is we have in dark mode so what we have is we have in dark mode so what we have is we have our cluster running our cluster running our cluster running here this is our cluster here this is our cluster here this is our cluster cluster on our Raspberry cluster on our Raspberry cluster on our Raspberry Pi this is our kubernetes cluster on our Pi this is our kubernetes cluster on our Pi this is our kubernetes cluster on our Raspberry Pi now on there we have we Raspberry Pi now on there we have we Raspberry Pi now on there we have we will install flocks will install flocks will install flocks or flocks or Argo CD those are the two or flocks or Argo CD those are the two or flocks or Argo CD those are the two main ones and I'm going to explain later main ones and I'm going to explain later main ones and I'm going to explain later why I chose flux over Argo CD but this why I chose flux over Argo CD but this why I chose flux over Argo CD but this is a is a is a controller that is running on our controller that is running on our controller that is running on our kubernetes cluster kubernetes cluster kubernetes cluster and this controller is constantly and this controller is constantly and this controller is constantly looking at a git repository and maybe
-
looking at a git repository and maybe looking at a git repository and maybe let's uh give that a let's uh give that a let's uh give that a circle git circle git circle git repo so repo so repo so this this this controller is constantly looking at the controller is constantly looking at the controller is constantly looking at the git repository it's constantly looking git repository it's constantly looking git repository it's constantly looking do I need to change something do I need do I need to change something do I need do I need to change something do I need to change something do I need to change to change something do I need to change to change something do I need to change something and this is known as a something and this is known as a something and this is known as a Reconciliation Reconciliation Reconciliation Loop in kubernetes you're going to be Loop in kubernetes you're going to be Loop in kubernetes you're going to be finding this often in different concepts finding this often in different concepts finding this often in different concepts as well but there's a Reconciliation as well but there's a Reconciliation as well but there's a Reconciliation Loop so what flux or Argo does when it Loop so what flux or Argo does when it Loop so what flux or Argo does when it is configured is that it it is is configured is that it it is is configured is that it it is configured to look at a git repo which configured to look at a git repo which configured to look at a git repo which contains configuration files and then contains configuration files and then contains configuration files and then the controller is going to apply those the controller is going to apply those the controller is going to apply those configuration files to our kubernetes configuration files to our kubernetes configuration files to our kubernetes cluster and it's always going to make cluster and it's always going to make cluster and it's always going to make sure that those two are in sync so when sure that those two are in sync so when sure that those two are in sync so when a change is made in the git repo that a change is made in the git repo that a change is made in the git repo that means that flux or Argo CD are going to means that flux or Argo CD are going to means that flux or Argo CD are going to implement that change for implement that change for implement that change for us so when I create when for example us so when I create when for example us so when I create when for example this is a resource definition of a this is a resource definition of a this is a resource definition of a database cluster on my um on my database cluster on my um on my database cluster on my um on my kubernetes cluster kubernetes cluster kubernetes cluster if I then were to change the storage if I then were to change the storage if I then were to change the storage size for example if I change this to 2 size for example if I change this to 2 size for example if I change this to 2 gb then flux is going to detect that
-
gb then flux is going to detect that gb then flux is going to detect that change and then it's going to apply this change and then it's going to apply this change and then it's going to apply this yl file and it's the same process that yl file and it's the same process that yl file and it's the same process that would be K apply F and then my yaml do would be K apply F and then my yaml do would be K apply F and then my yaml do yaml it's it's it basically does the yaml it's it's it basically does the yaml it's it's it basically does the same it just applies that yaml file to same it just applies that yaml file to same it just applies that yaml file to you but the important distinction here you but the important distinction here you but the important distinction here is is that you are not um imperatively is is that you are not um imperatively is is that you are not um imperatively telling Cube CTL to apply this file no telling Cube CTL to apply this file no telling Cube CTL to apply this file no you are defining a desired state in a you are defining a desired state in a you are defining a desired state in a git repo which is then being implemented git repo which is then being implemented git repo which is then being implemented by a controller in this case flux by a controller in this case flux by a controller in this case flux CD so that's what is meant by by where CD so that's what is meant by by where CD so that's what is meant by by where the entire code delivery process is the entire code delivery process is the entire code delivery process is controlled via git now there are some controlled via git now there are some controlled via git now there are some very important implications to that very important implications to that very important implications to that because because because now instead of needing access to the now instead of needing access to the now instead of needing access to the kubernetes cluster itself instead of kubernetes cluster itself instead of kubernetes cluster itself instead of needing access to the cube API server needing access to the cube API server needing access to the cube API server now all we need is access to the git now all we need is access to the git now all we need is access to the git repo and as you know git is of course repo and as you know git is of course repo and as you know git is of course created to collaborate on code basis so created to collaborate on code basis so created to collaborate on code basis so the power of managing your kubernetes the power of managing your kubernetes the power of managing your kubernetes through code is that you can collaborate through code is that you can collaborate through code is that you can collaborate so this is all of the configuration so this is all of the configuration so this is all of the configuration that's running in my kubernetes cluster that's running in my kubernetes cluster that's running in my kubernetes cluster but the powerful thing is that now I can but the powerful thing is that now I can but the powerful thing is that now I can create pull requests to that code and create pull requests to that code and create pull requests to that code and then Implement changes that way so here
-
then Implement changes that way so here then Implement changes that way so here I have an automation running on my I have an automation running on my I have an automation running on my cluster and this is level two this we're cluster and this is level two this we're cluster and this is level two this we're going to learn this as well in in this going to learn this as well in in this going to learn this as well in in this course but I'm just going to show you to course but I'm just going to show you to course but I'm just going to show you to drive the point home that I have a drive the point home that I have a drive the point home that I have a automation running that checks the T TS automation running that checks the T TS automation running that checks the T TS in my current configuration and sees if in my current configuration and sees if in my current configuration and sees if there are updates available this is done there are updates available this is done there are updates available this is done through renovate which is also what through renovate which is also what through renovate which is also what we're going to configure but this we're going to configure but this we're going to configure but this automation is going to say hey maybe you automation is going to say hey maybe you automation is going to say hey maybe you should consider updating to the latest should consider updating to the latest should consider updating to the latest tag which is tag which is tag which is 136 and if I 136 and if I 136 and if I then then then um approve this pool request then this um approve this pool request then this um approve this pool request then this code is going to change and I I can code is going to change and I I can code is going to change and I I can actually just do this right now so there actually just do this right now so there actually just do this right now so there is a PR here which is automatically is a PR here which is automatically is a PR here which is automatically created but I could do it myself too or created but I could do it myself too or created but I could do it myself too or a friend of mine could do it they could a friend of mine could do it they could a friend of mine could do it they could change this version again they change change this version again they change change this version again they change the image version in the code in this the image version in the code in this the image version in the code in this file so if I open the file just file so if I open the file just file so if I open the file just to um let me see view file if I open to um let me see view file if I open to um let me see view file if I open this file this is just a deployment this file this is just a deployment this file this is just a deployment manifest of an application in my cluster manifest of an application in my cluster manifest of an application in my cluster which then has an which then has an which then has an image um line and it's going to take a image um line and it's going to take a image um line and it's going to take a look at that line and see if that needs look at that line and see if that needs look at that line and see if that needs updates or if a friend of mine sees that updates or if a friend of mine sees that updates or if a friend of mine sees that I have configured a volume wrong or they I have configured a volume wrong or they I have configured a volume wrong or they want to add a volume they could submit a want to add a volume they could submit a want to add a volume they could submit a pull request and add a vol volume here pull request and add a vol volume here pull request and add a vol volume here for example so I go back to the pull
-
for example so I go back to the pull for example so I go back to the pull request and here it request and here it request and here it says I suggest that you change this tag says I suggest that you change this tag says I suggest that you change this tag to to to 136 and if I then merge this pool 136 and if I then merge this pool 136 and if I then merge this pool request then what's happens now is that request then what's happens now is that request then what's happens now is that the code is being updated in the repo so the code is being updated in the repo so the code is being updated in the repo so now the now the now the latest version of Main in my kubernetes latest version of Main in my kubernetes latest version of Main in my kubernetes cluster cluster cluster has um let me see here has version 136 has um let me see here has version 136 has um let me see here has version 136 so what flux is doing now is it's going so what flux is doing now is it's going so what flux is doing now is it's going to to to check the state of my git repo with the check the state of my git repo with the check the state of my git repo with the state in the cluster is going to see hey state in the cluster is going to see hey state in the cluster is going to see hey we don't have 13 uh6 running we have we don't have 13 uh6 running we have we don't have 13 uh6 running we have 131 so I need to make a change here and 131 so I need to make a change here and 131 so I need to make a change here and let me see if I go to my let me see if I go to my let me see if I go to my um as I mentioned what you're seeing now um as I mentioned what you're seeing now um as I mentioned what you're seeing now is only one module of my Complete is only one module of my Complete is only one module of my Complete kubernetes Home lab course this course kubernetes Home lab course this course kubernetes Home lab course this course will teach you everything you need to will teach you everything you need to will teach you everything you need to know to set up your own home lab from know to set up your own home lab from know to set up your own home lab from scratch with just a Raspberry Pi or an scratch with just a Raspberry Pi or an scratch with just a Raspberry Pi or an old laptop and as you can see after the old laptop and as you can see after the old laptop and as you can see after the GitHub Theory we go into installing GitHub Theory we go into installing GitHub Theory we go into installing flocks and then we go into a gith UPS flocks and then we go into a gith UPS flocks and then we go into a gith UPS deployment master class which which is deployment master class which which is deployment master class which which is already 1 hour long the entire course is already 1 hour long the entire course is already 1 hour long the entire course is about 8 hours it includes exercises and about 8 hours it includes exercises and about 8 hours it includes exercises and a Capstone project that you can use for a Capstone project that you can use for a Capstone project that you can use for your CV it's available after 1 month of your CV it's available after 1 month of your CV it's available after 1 month of membership or it can be unlocked membership or it can be unlocked membership or it can be unlocked instantly when you sign up for the instantly when you sign up for the instantly when you sign up for the annual annual annual subscription okay so now we see and I'm
-
subscription okay so now we see and I'm subscription okay so now we see and I'm going to show this how I'm going to what going to show this how I'm going to what going to show this how I'm going to what I just did I'm going to show everything I just did I'm going to show everything I just did I'm going to show everything but this is just to drive the point home but this is just to drive the point home but this is just to drive the point home we now see that the apps customization we now see that the apps customization we now see that the apps customization in my home lab cluster is now running so in my home lab cluster is now running so in my home lab cluster is now running so it is uh now reconciling the state with it is uh now reconciling the state with it is uh now reconciling the state with Git to the cluster so if I go to Git to the cluster so if I go to Git to the cluster so if I go to um uh K get PS and um uh K get PS and um uh K get PS and Linkedin we now see that it is actually Linkedin we now see that it is actually Linkedin we now see that it is actually creating a new container so there is an creating a new container so there is an creating a new container so there is an old container running here which is 70 old container running here which is 70 old container running here which is 70 days days days old and it's now creating a new pod with old and it's now creating a new pod with old and it's now creating a new pod with the new the new the new version that we specified in our git version that we specified in our git version that we specified in our git code so if I repeat code so if I repeat code so if I repeat the so maybe I could actually K the so maybe I could actually K the so maybe I could actually K describe describe describe pod and linking hopefully it's still pod and linking hopefully it's still pod and linking hopefully it's still there yes okay so here we will there yes okay so here we will there yes okay so here we will see that here the image is still 131 so see that here the image is still 131 so see that here the image is still 131 so that's the old pod it's running that's the old pod it's running that's the old pod it's running 131 and 131 and 131 and it is now creating that container it's it is now creating that container it's it is now creating that container it's it takes some time because it needs to it takes some time because it needs to it takes some time because it needs to pull the new pull the new pull the new image okay so now we're done so now the image okay so now we're done so now the image okay so now we're done so now the it has finished pulling the image and if it has finished pulling the image and if it has finished pulling the image and if I then K describe pod and I then K describe pod and I then K describe pod and linking and if I get the LinkedIn pod
-
linking and if I get the LinkedIn pod linking and if I get the LinkedIn pod over here then here we will see that it over here then here we will see that it over here then here we will see that it has has has now updated the image to 136 over here now updated the image to 136 over here now updated the image to 136 over here so that's the power of gitops I just so that's the power of gitops I just so that's the power of gitops I just merged a pull request and then merged a pull request and then merged a pull request and then flux detected that change and it updated flux detected that change and it updated flux detected that change and it updated the kubernetes cluster for me it updated the kubernetes cluster for me it updated the kubernetes cluster for me it updated the resource running on the kubernetes the resource running on the kubernetes the resource running on the kubernetes cluster for me so in this situation you cluster for me so in this situation you cluster for me so in this situation you are not dealing with Cube CTL you are are not dealing with Cube CTL you are are not dealing with Cube CTL you are not applying things by hand no you are not applying things by hand no you are not applying things by hand no you are telling in a git repo this is the state telling in a git repo this is the state telling in a git repo this is the state I want this is what I need and flux will I want this is what I need and flux will I want this is what I need and flux will handle the rest and that is the handle the rest and that is the handle the rest and that is the fundamental principle of giops going back to our giops going back to our notes so now I've notes so now I've notes so now I've demonstrated where the entire code demonstrated where the entire code demonstrated where the entire code delivery process is controlled via git delivery process is controlled via git delivery process is controlled via git now next we go into including now next we go into including now next we go into including infrastructure and application infrastructure and application infrastructure and application definition as code so what that means is definition as code so what that means is definition as code so what that means is on a kubernetes cluster there are on a kubernetes cluster there are on a kubernetes cluster there are several kinds of resources there is the several kinds of resources there is the several kinds of resources there is the infrastructure which is like your infrastructure which is like your infrastructure which is like your monitoring tooling your Ingress monitoring tooling your Ingress monitoring tooling your Ingress controller your database controller Etc controller your database controller Etc controller your database controller Etc that's what we call infrastructure so that's what we call infrastructure so that's what we call infrastructure so that is defined as code and application
-
that is defined as code and application that is defined as code and application definition is defined as code so when I definition is defined as code so when I definition is defined as code so when I go into my home lab repo then you will go into my home lab repo then you will go into my home lab repo then you will see there is an apps directory and for see there is an apps directory and for see there is an apps directory and for my production cluster you have comma my production cluster you have comma my production cluster you have comma feed and homepage and Linkedin Etc all feed and homepage and Linkedin Etc all feed and homepage and Linkedin Etc all these kinds of apps that are running these kinds of apps that are running these kinds of apps that are running there so those are defined in code but there so those are defined in code but there so those are defined in code but there's also the infrastructure which there's also the infrastructure which there's also the infrastructure which contains my uh controllers for CT contains my uh controllers for CT contains my uh controllers for CT manager and for the senology CSI driver manager and for the senology CSI driver manager and for the senology CSI driver my Ingress controller Etc so it's both my Ingress controller Etc so it's both my Ingress controller Etc so it's both the infrastructure and the applications the infrastructure and the applications the infrastructure and the applications that are being defined in code and also that are being defined in code and also that are being defined in code and also managed by managed by managed by codee and finally and automation to codee and finally and automation to codee and finally and automation to complete updates and roll backs so what complete updates and roll backs so what complete updates and roll backs so what I mentioned earlier was this renovate I mentioned earlier was this renovate I mentioned earlier was this renovate that is automatically checking the that is automatically checking the that is automatically checking the versions of the images that are running versions of the images that are running versions of the images that are running in my cluster and I'm going to show you in my cluster and I'm going to show you in my cluster and I'm going to show you how to do this but it's constantly how to do this but it's constantly how to do this but it's constantly checking are these images that are checking are these images that are checking are these images that are running here um do they have an update running here um do they have an update running here um do they have an update available can I update this is there a available can I update this is there a available can I update this is there a newer version available for me so I newer version available for me so I newer version available for me so I don't have to worry about following don't have to worry about following don't have to worry about following along with change logs and everything along with change logs and everything along with change logs and everything there's an automation at place for me there's an automation at place for me there's an automation at place for me that helps me to keep everything up to that helps me to keep everything up to that helps me to keep everything up to date all I need to do is to just merge date all I need to do is to just merge date all I need to do is to just merge these pool requests and then it will these pool requests and then it will these pool requests and then it will update it for update it for update it for me so code in automation to complete me so code in automation to complete me so code in automation to complete updates and roll backs now that is also
-
updates and roll backs now that is also updates and roll backs now that is also important because if I now go important because if I now go important because if I now go here and I go to my code and then I go here and I go to my code and then I go here and I go to my code and then I go to my to my to my commits I you see I have almost a commits I you see I have almost a commits I you see I have almost a thousand commits to this repo but here thousand commits to this repo but here thousand commits to this repo but here we see we have merged this pool request we see we have merged this pool request we see we have merged this pool request but if this but if this but if this somehow was not right if I if this led somehow was not right if I if this led somehow was not right if I if this led to problems then here I have in G the to problems then here I have in G the to problems then here I have in G the history of what happened I can see oh at history of what happened I can see oh at history of what happened I can see oh at this time and place I changed this to this time and place I changed this to this time and place I changed this to 136 so if my 136 so if my 136 so if my LinkedIn uh let me see am I even logged LinkedIn uh let me see am I even logged LinkedIn uh let me see am I even logged in in in there let me just check if I'm logged in there let me just check if I'm logged in there let me just check if I'm logged in no I'm not logged in but if my this is no I'm not logged in but if my this is no I'm not logged in but if my this is the actual update that we just did so the actual update that we just did so the actual update that we just did so this is just running all my home lab this is just running all my home lab this is just running all my home lab cluster but if this now somehow wasn't cluster but if this now somehow wasn't cluster but if this now somehow wasn't working then I could just go back and working then I could just go back and working then I could just go back and then take a look here and see well what then take a look here and see well what then take a look here and see well what happened when did it happen did I make happened when did it happen did I make happened when did it happen did I make any changes and if I want to uh revert any changes and if I want to uh revert any changes and if I want to uh revert this commit this commit this commit I can just use the git functionality to I can just use the git functionality to I can just use the git functionality to revert a commit so I can either like use revert a commit so I can either like use revert a commit so I can either like use a git revert command or I could just a git revert command or I could just a git revert command or I could just look at these changes and change them look at these changes and change them look at these changes and change them back so I have a full history of what is back so I have a full history of what is back so I have a full history of what is being changed in my git repo in my being changed in my git repo in my being changed in my git repo in my kubernetes cluster through these commits kubernetes cluster through these commits kubernetes cluster through these commits so I can see exactly what I did when I
-
so I can see exactly what I did when I so I can see exactly what I did when I did it so here I did a fixed DB commit did it so here I did a fixed DB commit did it so here I did a fixed DB commit let's check out what was Happ happening let's check out what was Happ happening let's check out what was Happ happening here so here I up I downgraded my number here so here I up I downgraded my number here so here I up I downgraded my number of instances to two so if I somehow had of instances to two so if I somehow had of instances to two so if I somehow had have a problem in the future I can see have a problem in the future I can see have a problem in the future I can see oh when did I change that so this is oh when did I change that so this is oh when did I change that so this is super important this allows for super important this allows for super important this allows for history and this allows for history and this allows for history and this allows for collaboration on projects it allows for collaboration on projects it allows for collaboration on projects it allows for security because you don't need access security because you don't need access security because you don't need access to the API server anymore everything is to the API server anymore everything is to the API server anymore everything is handled through code and it enables handled through code and it enables handled through code and it enables automation like I just showed you with automation like I just showed you with automation like I just showed you with these automatic automatic image updates these automatic automatic image updates these automatic automatic image updates that I that I that I have so it's this is this is the future have so it's this is this is the future have so it's this is this is the future this this type of workflow is how this this type of workflow is how this this type of workflow is how software should be deployed in my software should be deployed in my software should be deployed in my opinion because you have total control opinion because you have total control opinion because you have total control of what's happening and you have these of what's happening and you have these of what's happening and you have these all these opportunities for automation all these opportunities for automation all these opportunities for automation so it's extremely powerful and this is so it's extremely powerful and this is so it's extremely powerful and this is why I also want to have a kubernetes why I also want to have a kubernetes why I also want to have a kubernetes home lab instead of just a normal home lab instead of just a normal home lab instead of just a normal virtual machine because I get to virtual machine because I get to virtual machine because I get to practice these kinds of practices in my practice these kinds of practices in my practice these kinds of practices in my home lab home lab home lab and I get the history and the beauty of and I get the history and the beauty of and I get the history and the beauty of this is that this is all open to the this is that this is all open to the this is that this is all open to the public so I have a fully public record public so I have a fully public record public so I have a fully public record of what I'm doing in my home lab and of what I'm doing in my home lab and of what I'm doing in my home lab and what I'm learning so I can show this to what I'm learning so I can show this to what I'm learning so I can show this to a potential employer if someone asks me a potential employer if someone asks me a potential employer if someone asks me what is your experience with cetes or what is your experience with cetes or what is your experience with cetes or with giops I you say oh well check out
-
with giops I you say oh well check out with giops I you say oh well check out my home lab repo I have about a thousand my home lab repo I have about a thousand my home lab repo I have about a thousand commits in there and you can see exactly commits in there and you can see exactly commits in there and you can see exactly what I'm learning and I have exactly what I'm learning and I have exactly what I'm learning and I have exactly um what is it a few hundred files of um what is it a few hundred files of um what is it a few hundred files of code here and you can also for example code here and you can also for example code here and you can also for example see that I have lots of experience with see that I have lots of experience with see that I have lots of experience with the Enterprise DB operator for example the Enterprise DB operator for example the Enterprise DB operator for example here EDB operator so I'm running uh I'm here EDB operator so I'm running uh I'm here EDB operator so I'm running uh I'm running databases on my cluster and you running databases on my cluster and you running databases on my cluster and you can see exactly how I do it in the code can see exactly how I do it in the code can see exactly how I do it in the code so you are doing a public record of of so you are doing a public record of of so you are doing a public record of of your own learning by having this in a your own learning by having this in a your own learning by having this in a kubernetes home lab situation so that is kubernetes home lab situation so that is kubernetes home lab situation so that is one of the one of the one of the um that's the fundamental principles of um that's the fundamental principles of um that's the fundamental principles of gitops now let's look a little bit gitops now let's look a little bit gitops now let's look a little bit further what I've what I've written down further what I've what I've written down further what I've what I've written down in my note the key giops principles are in my note the key giops principles are in my note the key giops principles are the entire system infrastructure and the entire system infrastructure and the entire system infrastructure and applications is described declaratively applications is described declaratively applications is described declaratively so like I mentioned you describe it in so like I mentioned you describe it in so like I mentioned you describe it in code and flux handles it for you the code and flux handles it for you the code and flux handles it for you the canonical desired System state is verion canonical desired System state is verion canonical desired System state is verion in git we have the history we can check in git we have the history we can check in git we have the history we can check back which commits changed what changes back which commits changed what changes back which commits changed what changes approved are automated and applied to approved are automated and applied to approved are automated and applied to the system so when I approve a pool the system so when I approve a pool the system so when I approve a pool request we have seen that request we have seen that request we have seen that flock goes in and checks the difference flock goes in and checks the difference flock goes in and checks the difference and then implements that and then implements that and then implements that difference and software agents ensure difference and software agents ensure difference and software agents ensure correctness and alert on Divergence so
-
correctness and alert on Divergence so correctness and alert on Divergence so if there's somehow a an error here you if there's somehow a an error here you if there's somehow a an error here you can set up notification systems where FL can set up notification systems where FL can set up notification systems where FL will say for example when it can't apply will say for example when it can't apply will say for example when it can't apply something or something is going wrong something or something is going wrong something or something is going wrong you will get a message in your slack you will get a message in your slack you will get a message in your slack Channel and then you can check out um Channel and then you can check out um Channel and then you can check out um the the error so the key points here are the the error so the key points here are the the error so the key points here are the state of the cluster is always the state of the cluster is always the state of the cluster is always described in git git holds everything described in git git holds everything described in git git holds everything for the application and not just the for the application and not just the for the application and not just the source code so one thing to note here is source code so one thing to note here is source code so one thing to note here is that this code it's not the actual that this code it's not the actual that this code it's not the actual application code it's not the actual application code it's not the actual application code it's not the actual source code of the application this is source code of the application this is source code of the application this is just the code for example if I show you just the code for example if I show you just the code for example if I show you my um Health API let's check out that my um Health API let's check out that my um Health API let's check out that one my health one my health one my health API and I'm going to explain this API and I'm going to explain this API and I'm going to explain this directory structure in the next module directory structure in the next module directory structure in the next module but my health API but my health API but my health API deployment this one this is just the deployment this one this is just the deployment this one this is just the deployment file that contains the deployment file that contains the deployment file that contains the Manifest of this application of how I Manifest of this application of how I Manifest of this application of how I want to run this in my kubernetes want to run this in my kubernetes want to run this in my kubernetes cluster so this application is actually cluster so this application is actually cluster so this application is actually something that I created myself so something that I created myself so something that I created myself so github.com github.com github.com comom Misha vanberg Health API this is comom Misha vanberg Health API this is comom Misha vanberg Health API this is an application that I wrote myself this an application that I wrote myself this an application that I wrote myself this is just some python code is just some python code is just some python code that um enables me to insert um stuff
-
that um enables me to insert um stuff that um enables me to insert um stuff into a database that I'm running it's into a database that I'm running it's into a database that I'm running it's it's a very simple application it's a very simple application it's a very simple application but this is the actual application code but this is the actual application code but this is the actual application code so this application code lives in a so this application code lives in a so this application code lives in a separate repository so I can do my work separate repository so I can do my work separate repository so I can do my work here separate from my home lab and when here separate from my home lab and when here separate from my home lab and when I make changes to this repository then I I make changes to this repository then I I make changes to this repository then I have an Automation in place that it's have an Automation in place that it's have an Automation in place that it's going to create a a new version of the going to create a a new version of the going to create a a new version of the docker image which is then going to docker image which is then going to docker image which is then going to update the tag of the repo and this tag update the tag of the repo and this tag update the tag of the repo and this tag is then going to be detected by renovate is then going to be detected by renovate is then going to be detected by renovate and say hey hey you have an update ready and say hey hey you have an update ready and say hey hey you have an update ready here maybe it's time to update and when here maybe it's time to update and when here maybe it's time to update and when I accept that then it's going to apply I accept that then it's going to apply I accept that then it's going to apply the new version of the application to my the new version of the application to my the new version of the application to my cluster cluster cluster so the point is my home lab repo only so the point is my home lab repo only so the point is my home lab repo only contains the kubernetes manifests and contains the kubernetes manifests and contains the kubernetes manifests and then the application repo has the source then the application repo has the source then the application repo has the source code of the application so this is just code of the application so this is just code of the application so this is just a micro version of how it would work in a micro version of how it would work in a micro version of how it would work in an Enterprise situation then you have an Enterprise situation then you have an Enterprise situation then you have Dev teams managing their applications Dev teams managing their applications Dev teams managing their applications they are just collaborating in their own they are just collaborating in their own they are just collaborating in their own repo and then they create future repo and then they create future repo and then they create future branches and when then a feature bran branches and when then a feature bran branches and when then a feature bran branch is merged to the main branch a branch is merged to the main branch a branch is merged to the main branch a new version of the application is new version of the application is new version of the application is created with a new tag or a release and created with a new tag or a release and created with a new tag or a release and which is then being detected by the which is then being detected by the which is then being detected by the automation which is then being deployed automation which is then being deployed automation which is then being deployed to the dev um the dev cluster and then to the dev um the dev cluster and then to the dev um the dev cluster and then to the test clust test cluster Dev
-
to the test clust test cluster Dev to the test clust test cluster Dev cluster and then to the production cluster and then to the production cluster and then to the production cluster eventually there is no and the next Point there's there is no and the next Point there's no external deployment system with full no external deployment system with full no external deployment system with full access to the cluster the cluster itself access to the cluster the cluster itself access to the cluster the cluster itself is pulling changes and deployment is pulling changes and deployment is pulling changes and deployment information so again we are not um using information so again we are not um using information so again we are not um using terraform to like imperatively um push terraform to like imperatively um push terraform to like imperatively um push stuff to the cluster no it's actually stuff to the cluster no it's actually stuff to the cluster no it's actually the cluster itself looking at the source the cluster itself looking at the source the cluster itself looking at the source of Truth in this case git repo and it's of Truth in this case git repo and it's of Truth in this case git repo and it's then going to handle that implementation then going to handle that implementation then going to handle that implementation itself and finally the gitops controller itself and finally the gitops controller itself and finally the gitops controller is running a constant Loop and always is running a constant Loop and always is running a constant Loop and always matches the git state with the cluster matches the git state with the cluster matches the git state with the cluster state so this is what I meant with this state so this is what I meant with this state so this is what I meant with this Rec reconciliation Loop here the gitops Rec reconciliation Loop here the gitops Rec reconciliation Loop here the gitops controller is constantly looking at the controller is constantly looking at the controller is constantly looking at the git repo and whenever whenever there is git repo and whenever whenever there is git repo and whenever whenever there is a drift there is an update of the the a drift there is an update of the the a drift there is an update of the the git repo then this is going to be git repo then this is going to be git repo then this is going to be implemented with uh by the gitops implemented with uh by the gitops implemented with uh by the gitops controller so this is the fundamental controller so this is the fundamental controller so this is the fundamental principles of gitops this is how it principles of gitops this is how it principles of gitops this is how it works and why it works so beautifully works and why it works so beautifully works and why it works so beautifully and maybe you can tell by the way I'm and maybe you can tell by the way I'm and maybe you can tell by the way I'm speaking about this but I'm just speaking about this but I'm just speaking about this but I'm just completely in love with this kind of completely in love with this kind of completely in love with this kind of workflow I think this is the future of workflow I think this is the future of workflow I think this is the future of software deployment it is so clean so
-
software deployment it is so clean so software deployment it is so clean so well designed and um I think it's a very well designed and um I think it's a very well designed and um I think it's a very good move in your career to learn this good move in your career to learn this good move in your career to learn this and this is why I also Advocate having a and this is why I also Advocate having a and this is why I also Advocate having a kubernetes home lab so that you can kubernetes home lab so that you can kubernetes home lab so that you can practice this um at home as practice this um at home as practice this um at home as well so the last thing that I want to well so the last thing that I want to well so the last thing that I want to address is the choice between the gitops address is the choice between the gitops address is the choice between the gitops controllers that we're going to use so controllers that we're going to use so controllers that we're going to use so basically there are two big players in basically there are two big players in basically there are two big players in this space there's flock CD and there's this space there's flock CD and there's this space there's flock CD and there's Argo CD CD standing for continuous Argo CD CD standing for continuous Argo CD CD standing for continuous deployment and um if you have been deployment and um if you have been deployment and um if you have been looking for jobs then you might have looking for jobs then you might have looking for jobs then you might have seen both of these uh featured in job seen both of these uh featured in job seen both of these uh featured in job descriptions I mean they they do the descriptions I mean they they do the descriptions I mean they they do the same job but they have some same job but they have some same job but they have some differences and um I I will explain the differences and um I I will explain the differences and um I I will explain the choice of flux and why I use it in my choice of flux and why I use it in my choice of flux and why I use it in my homelab uh as contrary to Argo CD I mean homelab uh as contrary to Argo CD I mean homelab uh as contrary to Argo CD I mean I've worked professionally with both and I've worked professionally with both and I've worked professionally with both and they are both great tools and they work they are both great tools and they work they are both great tools and they work very well but I chose flocks uh for my very well but I chose flocks uh for my very well but I chose flocks uh for my home lab for several reasons home lab for several reasons home lab for several reasons one of them being that flux uh it one of them being that flux uh it one of them being that flux uh it although it has a UI flux really um although it has a UI flux really um although it has a UI flux really um motivates you to work more from the motivates you to work more from the motivates you to work more from the command line so flux has a wonderful command line so flux has a wonderful command line so flux has a wonderful CLI and it has if you if I get flux get CLI and it has if you if I get flux get CLI and it has if you if I get flux get customizations it it really forces a customizations it it really forces a customizations it it really forces a more gitops workflow in my opinion more gitops workflow in my opinion more gitops workflow in my opinion because they don't have a very rich UI
-
because they don't have a very rich UI because they don't have a very rich UI Argo CD on the other hand has a very Argo CD on the other hand has a very Argo CD on the other hand has a very rich UI where you can do so many things rich UI where you can do so many things rich UI where you can do so many things and you can uh perform lots of actions and you can uh perform lots of actions and you can uh perform lots of actions and it has like rback and it's really and it has like rback and it's really and it has like rback and it's really designed for collaborating with teams designed for collaborating with teams designed for collaborating with teams and such and it's super powerful but I and such and it's super powerful but I and such and it's super powerful but I actually think it can be a bit actually think it can be a bit actually think it can be a bit overwhelming it's it is a bit too much overwhelming it's it is a bit too much overwhelming it's it is a bit too much if you are just learning um giops you're if you are just learning um giops you're if you are just learning um giops you're just trying to wrap your mind around just trying to wrap your mind around just trying to wrap your mind around these cont Concepts secondly it is also these cont Concepts secondly it is also these cont Concepts secondly it is also um I mean it is relatively simple to get um I mean it is relatively simple to get um I mean it is relatively simple to get it started but since you are doing so it started but since you are doing so it started but since you are doing so much through a web UI then you don't much through a web UI then you don't much through a web UI then you don't seem to get that uh Hands-On practice seem to get that uh Hands-On practice seem to get that uh Hands-On practice from the CLI um as you would get from from the CLI um as you would get from from the CLI um as you would get from flux as we will see later now Argo CD flux as we will see later now Argo CD flux as we will see later now Argo CD has a CLI and you don't have to use the has a CLI and you don't have to use the has a CLI and you don't have to use the UI but since it has such a beautiful UI but since it has such a beautiful UI but since it has such a beautiful well-designed UI the well-designed UI the well-designed UI the my experience shows that usually you my experience shows that usually you my experience shows that usually you will revert to using the UI which I will revert to using the UI which I will revert to using the UI which I think is a bit of a shame in this kind think is a bit of a shame in this kind think is a bit of a shame in this kind of setup so of setup so of setup so flux flux really forces you to think the flux flux really forces you to think the flux flux really forces you to think the getups way because it doesn't have a uh getups way because it doesn't have a uh getups way because it doesn't have a uh UI I mean flux is adopted in huge UI I mean flux is adopted in huge UI I mean flux is adopted in huge companies like Volvo and and other it's companies like Volvo and and other it's companies like Volvo and and other it's becoming increasingly popular and lots becoming increasingly popular and lots becoming increasingly popular and lots of the almost all of the concepts are
-
of the almost all of the concepts are of the almost all of the concepts are will overlap between the tools it's will overlap between the tools it's will overlap between the tools it's really just a choice of tools but the really just a choice of tools but the really just a choice of tools but the core principles count for both and later core principles count for both and later core principles count for both and later I'm going to create another course where I'm going to create another course where I'm going to create another course where I will be using Argo but um I mean even I will be using Argo but um I mean even I will be using Argo but um I mean even sap is using flux right I mean that's sap is using flux right I mean that's sap is using flux right I mean that's huge but so it forces you to think more huge but so it forces you to think more huge but so it forces you to think more gith ups and another reason why I like gith ups and another reason why I like gith ups and another reason why I like flocks a lot is because the native AKs flocks a lot is because the native AKs flocks a lot is because the native AKs offering in azure offering in azure offering in azure so manage kubernetes service in so manage kubernetes service in so manage kubernetes service in Microsoft Azure they have a gitops Microsoft Azure they have a gitops Microsoft Azure they have a gitops integration which is using flux so if integration which is using flux so if integration which is using flux so if you are a Azure focused engineer who is you are a Azure focused engineer who is you are a Azure focused engineer who is going to be working with AKs then you going to be working with AKs then you going to be working with AKs then you will it is a really good move to have will it is a really good move to have will it is a really good move to have more understanding of more understanding of more understanding of flux and having uh being well versed in flux and having uh being well versed in flux and having uh being well versed in that ecosystem you you can use Argo CD that ecosystem you you can use Argo CD that ecosystem you you can use Argo CD on AKs clusters it's not that you need on AKs clusters it's not that you need on AKs clusters it's not that you need to but um the native gitops offering in to but um the native gitops offering in to but um the native gitops offering in Azure kubernetes service is using flocks Azure kubernetes service is using flocks Azure kubernetes service is using flocks and by extension customize which is the and by extension customize which is the and by extension customize which is the next point that I want to next point that I want to next point that I want to address another reason why I like flux address another reason why I like flux address another reason why I like flux is because it it heavily relies on is because it it heavily relies on is because it it heavily relies on customize now customize let me see customize now customize let me see customize now customize let me see kubernetes customize customize is like a
-
kubernetes customize customize is like a kubernetes customize customize is like a a templating language for kubernetes a templating language for kubernetes a templating language for kubernetes manifests it's declarative management of manifests it's declarative management of manifests it's declarative management of kubernetes objects using kubernetes objects using kubernetes objects using customize and a customization file is customize and a customization file is customize and a customization file is basically a way to create kubernetes manifests so the term customization manifests so the term customization refers to a customization yamof file or refers to a customization yamof file or refers to a customization yamof file or more generally to a directory and all more generally to a directory and all more generally to a directory and all the relative file path that immediately the relative file path that immediately the relative file path that immediately references all the data that doesn't references all the data that doesn't references all the data that doesn't require URL require URL require URL specification so what it means is that specification so what it means is that specification so what it means is that you we're going to be going into this you we're going to be going into this you we're going to be going into this and we're going to be using customize and we're going to be using customize and we're going to be using customize extensively but if you have a kubernetes extensively but if you have a kubernetes extensively but if you have a kubernetes manifest like this um here this is a manifest like this um here this is a manifest like this um here this is a kubernetes manifest now this is my base kubernetes manifest now this is my base kubernetes manifest now this is my base layer of the manifests and I'm going to layer of the manifests and I'm going to layer of the manifests and I'm going to explain what that means later but but explain what that means later but but explain what that means later but but with a customization file I can then with a customization file I can then with a customization file I can then take that base and apply changes to it take that base and apply changes to it take that base and apply changes to it so I can use this base as a template and so I can use this base as a template and so I can use this base as a template and then use customize to for example change then use customize to for example change then use customize to for example change it to a production specific one here is it to a production specific one here is it to a production specific one here is a customization file that calls all of a customization file that calls all of a customization file that calls all of the other directories so through this the other directories so through this the other directories so through this customization file if I just delete this customization file if I just delete this customization file if I just delete this directory then that deployment is going directory then that deployment is going directory then that deployment is going to be deleted from my kubernetes cluster to be deleted from my kubernetes cluster to be deleted from my kubernetes cluster just as an example and this is very
-
just as an example and this is very just as an example and this is very deeply integrated with kubernetes and I deeply integrated with kubernetes and I deeply integrated with kubernetes and I think customize is a extremely useful think customize is a extremely useful think customize is a extremely useful tool to learn and you will do well for tool to learn and you will do well for tool to learn and you will do well for your career to master this and flux your career to master this and flux your career to master this and flux really forces you to use this basically really forces you to use this basically really forces you to use this basically with Argo you very quickly resort to with Argo you very quickly resort to with Argo you very quickly resort to helm or or other other uh types of helm or or other other uh types of helm or or other other uh types of deployment and even though you can use deployment and even though you can use deployment and even though you can use customize with Argo CD in my experience customize with Argo CD in my experience customize with Argo CD in my experience it is not used that much whereas um when it is not used that much whereas um when it is not used that much whereas um when you use flux you have to use customize you use flux you have to use customize you use flux you have to use customize and that is an extremely useful skill to and that is an extremely useful skill to and that is an extremely useful skill to learn if you are a serious kubernetes learn if you are a serious kubernetes learn if you are a serious kubernetes engineer so in in engineer so in in engineer so in in summary I choose flux because it's summary I choose flux because it's summary I choose flux because it's easier to set up it's less overwhelming easier to set up it's less overwhelming easier to set up it's less overwhelming it forces you to focus on the CI it it forces you to focus on the CI it it forces you to focus on the CI it forces you to think GE Ops in my opinion forces you to think GE Ops in my opinion forces you to think GE Ops in my opinion and it forces you to learn customize and it forces you to learn customize and it forces you to learn customize which are all huge uh very valuable which are all huge uh very valuable which are all huge uh very valuable skills in your career as a kubernetes skills in your career as a kubernetes skills in your career as a kubernetes engineer and then um Argo CD can come engineer and then um Argo CD can come engineer and then um Argo CD can come later you can just replace that with um later you can just replace that with um later you can just replace that with um you can replace flux with Argo later but you can replace flux with Argo later but you can replace flux with Argo later but I think you're going to love it and uh I think you're going to love it and uh I think you're going to love it and uh if you want to learn Argo then code if you want to learn Argo then code if you want to learn Argo then code fresh has tons of courses that are fresh has tons of courses that are fresh has tons of courses that are really good as well but I I suggest really good as well but I I suggest really good as well but I I suggest using flux in the home lab and then using flux in the home lab and then using flux in the home lab and then maybe switch into Argo later or set up a maybe switch into Argo later or set up a maybe switch into Argo later or set up a second home lab with Argo and and mostly second home lab with Argo and and mostly second home lab with Argo and and mostly if you are interested in becoming an if you are interested in becoming an if you are interested in becoming an Azure engineer you will do well in
-
Azure engineer you will do well in Azure engineer you will do well in knowing flux so that is enough about the knowing flux so that is enough about the knowing flux so that is enough about the gitops theory now we are going to gitops theory now we are going to gitops theory now we are going to actually go into installing this gitops actually go into installing this gitops actually go into installing this gitops controller and start deploying some controller and start deploying some controller and start deploying some applications so if this was valuable to applications so if this was valuable to applications so if this was valuable to you join cubecraft today where you can you join cubecraft today where you can you join cubecraft today where you can network with over 400 Engineers you can network with over 400 Engineers you can network with over 400 Engineers you can get direct access to me in the one of get direct access to me in the one of get direct access to me in the one of the group coaching calls that I do every the group coaching calls that I do every the group coaching calls that I do every week and you can always ask questions week and you can always ask questions week and you can always ask questions 247 to me and the community to help you 247 to me and the community to help you 247 to me and the community to help you out if you get it's stuck
Summary
This tech transcript introduces GitOps as a critical modern workflow for managing production systems and offers a free module from a premium Kubernetes homelab course. It emphasizes that GitOps is a set of best practices where the entire code delivery process, including infrastructure and application definitions, is controlled via Git with automation for updates and rollbacks. The practical takeaway is to embrace GitOps, comparing Flux and Argo CD, to advance your technical skills for career opportunities.