Flux GitOps Tutorial - DevOps and GitOps for Kubernetes

  Рет қаралды 67,409

Techno Tim

Techno Tim

Күн бұрын

I think I found the perfect GitOps and DevOps toolkit with FluxCD and Kubernetes. Flux is an open source GitOps solution that helps your deploy app and infrastructure with automation. It can monitor git repositories, source control, image container repositories, helm repositories, and more. It can install apps using Kustomize, Helm, Kubernetes manifests so it's designed to fit into your existing workflow. It can even push alerts to your chat system letting you know when deployments happen. In this tutorial we'll cover all of this and more.
Video Notes: technotim.live/posts/flux-dev...
Support me on Patreon: / technotim
Sponsor me on GitHub: github.com/sponsors/timothyst...
Subscribe on Twitch: / technotim
Become a KZbin member: / @technotim
Merch Shop 🛍️: l.technotim.live/shop
Gear Recommendations: l.technotim.live/gear
Get Help in Our Discord Community: l.technotim.live/discord
2nd channel: / @technotimtalks
Set up kubernetes, fast and automated! • The FASTEST Way to run...
(Affiliate links may be included in this description. I may receive a small commission at no cost to you.)
#DevOps #GitOps #Kubernetes
00:00 - How I do DevOps
01:25 - What is FluxCD?
02:49 - Flux CLI
03:05 - Fastest way to set up a kubernetes cluster at home
03:19 - Installing Flux on you Kubernetes Cluster
04:09 - Structuring your repo - Monorepo
05:11 - Using Kubernetes Manifests (Source Controller)
06:07 - Kubernetes Lens
06:25 - Using Helm Charts (Helm Controller)
07:49 - Container Image Deployment (Image Automation Controller)
09:41 - Chat Notifications
10:25 - Enjoy Your GitOps / DevOps Workflow!
11:13 - Stream Highlight - "Dealing with Imposter Syndrome"
"Undetected" is from Harris Heller's album "Bounce"
l.technotim.live/sb-music-lic...
Thank you for watching!

Пікірлер: 117
@TechnoTim
@TechnoTim 2 жыл бұрын
I think I turned the NERD up to 11 with this one!
@ObiWanCanOweMe
@ObiWanCanOweMe 2 жыл бұрын
I'm a DevOps engineer and for the past couple of years I've been struggling to wrap my head around Kubernetes et. al. Your content has made all the difference in the world! I usually have to go to a conference to get this sort of knowledge transfer and inspiration. Now the progress I'm making in this space is beyond anything I could have imagined even just six months ago. Please don't be afraid to keep the NERD turned up to 11; your content is so INCREDIBLY helpful :)
@TechnoTim
@TechnoTim 2 жыл бұрын
Thank you so much for the kind words! It's a tough balance between intro content and going deep. I am glad you appreciate the depth! Keep it up! You got this!
@LampJustin
@LampJustin 2 жыл бұрын
Gemme more ^^ I'd like to see ArgoCD also. Nice video btw, thank you!
@diogomild
@diogomild 2 жыл бұрын
Yes, Argo as well please!!
@christianlempa
@christianlempa 2 жыл бұрын
This is so amazing! Like the new camera angle and the new presentation style a lot 🥰
@TechnoTim
@TechnoTim 2 жыл бұрын
Thanks Christian!
@shaunwallace1307
@shaunwallace1307 2 жыл бұрын
Perfect timing on this video. I just got my cluster up and running using the k8s-at-home template and it uses Flux, Kustomize and Helm. Its actually been pretty nice to work with. Thanks for another awesome video.
@ynotwizard
@ynotwizard 2 жыл бұрын
I discovered your channel very recently, and I absolutely love your content. I'm still learning a lot about homelabbing, self-hosting, Kubernetes, etc. and your videos have really struck a chord in helping me learn these decently complex concepts much faster and easier. This is my first video of yours that I'm seeing on day 1, and I just wanted to say thanks for the great content, and keep it up!
@TechnoTim
@TechnoTim 2 жыл бұрын
Thank you so much!
@rudypieplenbosch6752
@rudypieplenbosch6752 2 жыл бұрын
Because of your channel, I compiled my first Blender docker container today. I'm going to try to create a distributed Kubernetes cluster to handle the Blender rendering workload in my home network. My server and several clients can be used for this purpose. I have an engineering background but without such tutorials its much more cumbersome to get it done, just 2 days ago I started with docker and portainer, your tutorials are very helpfull, well presented and easy to understand, thanks man 👍, you're a legend.
@TechnoTim
@TechnoTim 2 жыл бұрын
Thank you so much and way to go! That's quite the journey!
@JzJad
@JzJad 2 жыл бұрын
I was ready to ask what that UI was, then you answered it seconds later, thank you! Also great video like always!
@johnjbateman
@johnjbateman 2 жыл бұрын
I love the new angle, and your presence is night and day compared to older videos! you're a pro now!
@TechnoTim
@TechnoTim 2 жыл бұрын
Thank you so much! What a journey! Still more to come!
@orsonc.badger7421
@orsonc.badger7421 2 жыл бұрын
Tim I love your channel! Being in Devops, I learn so much from you! Thanks dude :)
@TechnoTim
@TechnoTim 2 жыл бұрын
Glad to hear it!
@dermuschelschluerfer
@dermuschelschluerfer 2 жыл бұрын
You are helping me so much learning about kubernetes. This is the only thing i still cant get my head around completely.
@Jake-so6bp
@Jake-so6bp 2 жыл бұрын
Your content is literal fire man. Love your channel! I have to try this out ASAP now lol.
@tasdidashraf5649
@tasdidashraf5649 2 ай бұрын
very clear explanation. Thanks a lot. I would love to see this same video with included Terraform concept in it.
@examen1996
@examen1996 2 жыл бұрын
This is the content for which I am subscribed to you , awesome job!
@tomklein6540
@tomklein6540 Жыл бұрын
Great video 👍🏼 this made my k3s cluster so much better. Had to pauze and go back a couple of times as its a quite fast overview so you easily mis a crucial part.
@l9fps
@l9fps 2 жыл бұрын
Awesome quality. I'm glad this found me. I actually needed this.
@motdde
@motdde Жыл бұрын
The advice at the end is spot on. I am currently have a meltdown learning Golang.
@jonatansteuernagel1264
@jonatansteuernagel1264 2 жыл бұрын
I‘ve been into ArgoCD a lot due to work, but Flux looks very awesome too. Especially the part where it monitors a Registry for new Artifacts, that seems super helpful. Will probably go the Flux route for my homelab now.
@cheebadigga4092
@cheebadigga4092 Жыл бұрын
There's ArgoCD Image Updater that does the same thing, but that's a separate application/plugin you need to take care of. So there's tradeoffs with that.
@simaattar3154
@simaattar3154 9 ай бұрын
Awesome, crystal clear, and well-ordered video! Thanks a lot!
@delduked
@delduked 2 жыл бұрын
OMG IVE BEEN DOING THE SAME THING!!!!! I’m a developer too! Love your channel!
@socal-media-nerd
@socal-media-nerd 2 жыл бұрын
Great. Another maintenance window aka weekend fun at home. Ty Tim!
@diegomachado2239
@diegomachado2239 2 жыл бұрын
This are really Good, Great Job Tim 🔥
@ShotgunKlaus
@ShotgunKlaus 2 жыл бұрын
Thanks for the Lens tip! This is so much better then staring at terminals running watch 'kubectl get pods' :D
@GregDePasse
@GregDePasse 2 жыл бұрын
I've been following your channel and love your content. As a newbie who doesn't do this for a living, I'm making great progress and keeping up (IMHO) thanks to you and your videos. I'm just not able to make the leap from docker-compose to this. Any chance you could run through setting up some apps from k8s-at-home? There are a ton of great home lab examples which use flux and argocd, but I can't make the leap to understand what's going on. I love your HA Kubernetes + Ansible video BTW.
@Gunzy83
@Gunzy83 2 жыл бұрын
Been slowly building out my homelab again from the bottom up (PXE boot all machines to install Flatcar Linux, securely introduce machines to Vault and finally getting to Consul and Nomad to do something different from k8s and ECS at work) but your content is making me want to pivot to k3s, not going to lie. Would love to see a comparison with Argo. Keep up the great work mate.
@TechnoTim
@TechnoTim 2 жыл бұрын
Thank you so much! Will do!
@Gunzy83
@Gunzy83 Жыл бұрын
Came back to say I'm all in on k3s and flux now lol
@KhalilKHAMLICHI
@KhalilKHAMLICHI 2 жыл бұрын
Always a joy to watchyour videos
@TechnoTim
@TechnoTim 2 жыл бұрын
Thank you!
@JonWilliams84
@JonWilliams84 2 жыл бұрын
I have been using kubernetes agent for gitlab-ci in my homelab for some time, I love it because it's easy and works with both helm and raw manifests. Never really been a fan of Helm, so most of my stuff is in manifests, but I have the option, none the less. The thing I like about flux that I didn't realise until watching this is update management. I use Keel currently because I like to be able to define a per service policy around tags add an approval step (via Slack bot) before an updated image gets rolled out; but this has its downfall in the fact that I often forget to update the tag in the k8s manifest with the new image after keel has done its thing. I then go and make a change to the manifest in my repo, push that change up and inadvertently roll back an image. Thanks, I might have a play later.
@isaacgroen3692
@isaacgroen3692 2 жыл бұрын
awesome! Please show an overview of all alternatives like you suggested :)
@_nttai
@_nttai Жыл бұрын
Hi Tim, thank you for this really helpful tutorial. One question, what is the dashboard you are using 0:21? It looks really nice :)
@erics8362
@erics8362 Жыл бұрын
seems very nice. I like that it doesn't allow you to make mistake - no namespace in manifest - "namespace not specified, error: the server could not find the requested resource" and so on
@brahyamalmonteruiz9984
@brahyamalmonteruiz9984 Жыл бұрын
whoa amazing technology, just .... amazing
@TheSHELMSY
@TheSHELMSY Жыл бұрын
Literally exactly what I was looking for. Tough for a sec engineer to understand CI/CD pipelines. Simple and super useful video. Will be using this for my home lab. Side note. Do you use multiple kubernetes clusters? I.e Rancher/K8s and K3s.
@TechnoTim
@TechnoTim Жыл бұрын
Thanks! I do. One for rancher and one for everything else!
@admun
@admun 2 жыл бұрын
Like mind, think the same. I am working to switch to flux as part of my move away from rancher project. Just got rke2 deployed sort of the way I wanted, so next step is setup flux to deploy things like Prometheus stack, metallb & etc
@admutin
@admutin 2 жыл бұрын
Three things: 1. Is it possible to revert a deployment after it autodetects an new image? For example you found a bug and the fix will take some time. 2. Maybe take a look at k9s. Awesome k8s management tool I use. 3. Your content is like cocain to me! ;)
@TechnoTim
@TechnoTim 2 жыл бұрын
There is no revert, only move forward, just commit the old tag :) Also, thank you!
@NerdzNZ
@NerdzNZ 5 ай бұрын
This was super interesting, Thank You. I am curious what your Infrastructure as code looks like outside of Kubernetes. Say you have a new machine with Proxmox on it. How do you handle the building and deploying of VMs? do you just run Terraform/Ansible locally? or do you have a process like Flux for all things outside of Kubernetes?
@RocketLR
@RocketLR 2 жыл бұрын
You have no idea how much I've needed this video. Working for huge corporation and basically this is my situation: Ericsson - "You know some combination of programming languages right? Are you a fullstack developer?" Me - "eh.. yes but no? You hired me for my Linux, Network and virtualization skills. I'm a infra guy." Ericsson - "GREAT! Heres a fullstack developer assignment." I love it but as Im building the front-end and the back-end.. Its getting REAAALY messy with each new modification. Im ashamed to say that im basically copying the whole project folder into a backup folder before each major change... This whole developing and deploying things into Kubernetes is such a messy web for me..
@Michael201078
@Michael201078 2 жыл бұрын
Great. Just great content
@CTWilliams89
@CTWilliams89 Жыл бұрын
Awesome content! I've been following for a while, and started leaning real hard into devops and trying to pick up as much as I can as fast as I can. While also trying to implement it at work. One question from this video I had was, does this setup sort of replace rancher or supplement it?
@TechnoTim
@TechnoTim Жыл бұрын
It can supplement it! Just worked through installing Rancher with FLUX so it's a really nice way to source control your cluster and deploy it like code!
@CTWilliams89
@CTWilliams89 Жыл бұрын
@@TechnoTim I was just looking for how to upgrade the version of kubernetes. I used your ansible playbook to get mine up and running. Then put rancher on top of it but I can't upgrade it. The whole gitops strategy is looking real nice right now lol!
@delduked
@delduked 2 жыл бұрын
OMG YOUR USING THE SAME DISCORD NOTIFIER SETUP!!
@AllInOneIdeasShop
@AllInOneIdeasShop Жыл бұрын
Would love to see a video on ArgoCD. Also for some teams a gate would be required to push to prod instead of automated sync.
@TechnoTim
@TechnoTim Жыл бұрын
Totally agree!
@jamallmahmoudi9481
@jamallmahmoudi9481 9 ай бұрын
cool & perfect 👌🙏🙏🙏
@alexinno83
@alexinno83 2 жыл бұрын
great content as always from what i've read about flux it only works with k8s i'm wondering if there's something like this that would work with things like ansible or other similar tools
@TechnoTim
@TechnoTim 2 жыл бұрын
Not with flux, I think you could just do this in CI though!
@ChanwitKaewkasi
@ChanwitKaewkasi 2 жыл бұрын
we have a Terraform controller that works natively for Flux to help you manage cloud resources. Not sure if that's what you're looking for.
@Sanatana_Purush
@Sanatana_Purush 8 ай бұрын
Johnny Depp teaching software concepts, so cool 😁
@joe_ferreira
@joe_ferreira 2 жыл бұрын
Thank you
@andydiep4162
@andydiep4162 2 жыл бұрын
HOLY SHIT u went off on this one
@RandomUserOnTheInterWebs
@RandomUserOnTheInterWebs 2 жыл бұрын
This all genuinely looks fucking awesome, but there's a point at which this starts to feel as though you are learning new tools to manage the tools which manage your deployments.
@TechnoTim
@TechnoTim 2 жыл бұрын
Which then manage tools 😀. I hear you but what this does enable is kubernetes deployments from git that are repeatable and version controlled.
@ObiWanCanOweMe
@ObiWanCanOweMe 2 жыл бұрын
Thanks!
@TechnoTim
@TechnoTim 2 жыл бұрын
Wow! Thank you much!!!
@dandogamer
@dandogamer Жыл бұрын
I've been trying to obtain my cert in k8s and wondering whats the difference here between flux and argoCD?
@KaizeesHub
@KaizeesHub 2 жыл бұрын
Hi Tim, I am a regular infrastructure engineer who specialises primarily in Virtualization and Storage - I am wanting to get into DevOps, I have no experience with coding though I am pushing myself to learn Python, YAML and Go - How do you keep yourself up to date with the latest 'solutions' such as FluxCD, Prometheus/Grafana, as well as others that make you then adopt that service? I would like to know where to go, in order to stay up to date with this sort of information - Great tutorial, I will definitely be tinkering with FluxCD soon on my homelab I'm sure!!
@TechnoTim
@TechnoTim 2 жыл бұрын
Thank you! Well our Discord is a good place! Lots of infra folks in there! Otherwise I just try to keep my pulse on the cloud since that’s where so much technology is being developed!
@law1213
@law1213 Жыл бұрын
Would/Could/Should you run something like this in your production cluster in a release often setup, or would it be for something like test clusters or both?
@TechnoTim
@TechnoTim Жыл бұрын
Both. GitOps it’s the way!
@logicstv
@logicstv 11 ай бұрын
Where can I learn to setup this workflow?
@kpwlek
@kpwlek Жыл бұрын
Can you cover nomad?
@mitchross2852
@mitchross2852 2 жыл бұрын
I think you should cover how to add SSH Public key to nodes for ansible and k3s. Its not explicitly covered and a lot of people will run into that as an issue.
@TechnoTim
@TechnoTim 2 жыл бұрын
I would just do an ssh-copy-id to ssh into the machines first
@mitchross2852
@mitchross2852 2 жыл бұрын
@@TechnoTim yea perhaps put in your web site docs for that step or description as a shown note.
@weirdstuffsforyou
@weirdstuffsforyou 2 жыл бұрын
What do you think about the Argo CD? I like flux cd but I prefer Argo cd over it. Argo projects have a lot to offer and fancy dashboards.
@TechnoTim
@TechnoTim 2 жыл бұрын
Soon!
@token112
@token112 2 жыл бұрын
Sad day for me, this channel has gotten too advanced for me. Miss the older days of getting hand held through docker or a network setup. I don't even know what I just watched. Looks like you changed the room you film out of... I guess I don't like change lol
@TechnoTim
@TechnoTim 2 жыл бұрын
Sorry!
@ig23174
@ig23174 2 жыл бұрын
Did you think about using external secret operator instead of sealed secrets? You can fetch your secrets from a hasicorp vault or a secret management solution of your cloud provider
@TechnoTim
@TechnoTim Жыл бұрын
I use mozilla sops
@CrankyCoder
@CrankyCoder 2 жыл бұрын
When you created the manifest in the "default" folder. Does that folder have any meaning? or just your way of organizing namespace?
@TechnoTim
@TechnoTim 2 жыл бұрын
Just organizing according to name space.
@CrankyCoder
@CrankyCoder 2 жыл бұрын
@@TechnoTim thanks for the clarification. you have any advanced flux stuff? like variable replacement where those vars are stored in the ci/cd tool?
@jgarfield
@jgarfield 2 жыл бұрын
What are you using for diagrams? Looks sleek!
@TechnoTim
@TechnoTim Жыл бұрын
Diagrams and licid charts!
@leehull8168
@leehull8168 2 жыл бұрын
What's the dev prefix you are using in the terminal? I haven't seen that one before
@TechnoTim
@TechnoTim 2 жыл бұрын
It’s the folder I am in. I am using zhsell with oh my zsh
@leehull8168
@leehull8168 2 жыл бұрын
@@TechnoTim Haha, that makes sense..
@saltandsham
@saltandsham 2 жыл бұрын
Hi Tim I'm getting an error when bootstrapping "waiting for Kustomization "flux-system/flux-system" to be reconciled" any idea please ?
@TechnoTim
@TechnoTim Жыл бұрын
Check your tokens or look at the logs!
@eritert
@eritert 2 жыл бұрын
What is the benefit of using kubernetes over just containers?
@RuanBekker
@RuanBekker Жыл бұрын
Kubernetes is a container orchestration framework. Running a couple of containers on one server is easy, when you notice one is down, you can start it back up. But it becomes really difficult to manage when you run 20 services, with lets say 5 replicated containers per service over 10 nodes. To maintain 100 containers by yourself is not fun. So kubernetes task is to ensure desired state. If your service was defined to run 5 replicas per service, kubernetes will ensure that it keeps desired state, if a node goes down, kubernetes will notice it and makes sure that the dead containers are rescheduled. Then theres things like scheduling algorithms, etc.
@spikejnz
@spikejnz 2 жыл бұрын
Do you have any experience using Flux in a multi-cluster/multi-env infrastructure? I manage 24 K8s clusters across multiple datacenters on numerous continents. I've been looking for an effective GitOps solution that allows me to stagger deployments across environments. Given our breadth of stakeholders, we unfortunately cannot implement a true CI/CD workflow, as multiple internal and external stakeholders may be validating new features in lower environments, and are not yet ready for them to go to prod. The problem with the GitOps model in this scenario is that it requires either managing multiple branches (eww), or multiple repos (ewwer).
@TechnoTim
@TechnoTim 2 жыл бұрын
You can manage multiple clusters and multiple envs per cluster with Flux. I think Fleet also does GitOps at scale (millions of clusters)
@mitchross2852
@mitchross2852 2 жыл бұрын
Woooooooooooooooo!!!!!
@chrisjohnston1735
@chrisjohnston1735 Жыл бұрын
Why did you pick Flux over Argo?
@TechnoTim
@TechnoTim Жыл бұрын
I like the simplify, low resources, and pull model. Will be reviewing argo too!
@jmcglock
@jmcglock 2 жыл бұрын
Hey! Awesome! I just made a video about Argo CD! About the same as Flux. I like Argo better tho.
@scottamolinari
@scottamolinari Жыл бұрын
One thing I'm still trying to figure out is, how to make things work with a cluster that already has a number of applications running. Basically how to retrofit Flux into a working cluster.
@regis9596
@regis9596 Жыл бұрын
use the manifest or the helm chart you were already using
@scottamolinari
@scottamolinari Жыл бұрын
@@regis9596 Yep. I'm understanding Flux better now, thanks!
@delduked
@delduked 2 жыл бұрын
You’re basically me just not bald lol
@jerry3k
@jerry3k Жыл бұрын
Argocd please Timmy.
@TechySpeaking
@TechySpeaking 2 жыл бұрын
First
@Rundik
@Rundik Жыл бұрын
"High availability home cluster" - it can't be both. Some internet or electricity failure and you're out
@TechnoTim
@TechnoTim Жыл бұрын
backup internet and UPS ✅
@teddybear7949
@teddybear7949 2 жыл бұрын
much to fast for me
@chrisa.1740
@chrisa.1740 2 жыл бұрын
That's why the pause button exists, making instructional videos like this great on KZbin. Tim also links to his show notes in the description, which should get you sorted.
@TechnoTim
@TechnoTim 2 жыл бұрын
Sorry!
@teddybear7949
@teddybear7949 2 жыл бұрын
I Will watch again and read thé notes. Great content of course as usual. Thank you Tim
@nullify.
@nullify. 2 жыл бұрын
Buzzword Soup.
@TechnoTim
@TechnoTim 2 жыл бұрын
I forgot a few web3, crypto, nft, ai
@nullify.
@nullify. 2 жыл бұрын
@@TechnoTim true. Lol
@mr_wormhole
@mr_wormhole Жыл бұрын
very tiny suggestion, it is actually a nit since I am very noob in infra topics, in a single project, please favor only .yml or only .yaml but not both at the same time, consistency is really a good thing in a monorepo :)
The World's Fastest Cleaners
00:35
MrBeast
Рет қаралды 131 МЛН
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Рет қаралды 35 МЛН
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 15 МЛН
ArgoCD Tutorial for Beginners | GitOps CD for Kubernetes
47:53
TechWorld with Nana
Рет қаралды 574 М.
Efficient GitOps with GitLab and Flux
16:37
GitLab Unfiltered
Рет қаралды 1,3 М.
I Built the PERFECT Game Server with Pterodactyl and Docker
33:30
flux, flux и в production / Виталий Медведев (ЦФТ)
47:09
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 203 М.
Getting the Most Performance out of TrueNAS and ZFS
18:31
Techno Tim
Рет қаралды 59 М.
Kubernetes GitOps with Flux CD
16:47
That DevOps Guy
Рет қаралды 51 М.
Vortex Cannon vs Drone
20:44
Mark Rober
Рет қаралды 14 МЛН
Airpods’un Gizli Özelliği mi var?
0:14
Safak Novruz
Рет қаралды 2,8 МЛН
How about that uh?😎 #sneakers #airpods
0:13
Side Sphere
Рет қаралды 8 МЛН
Такого вы точно не видели #SonyEricsson #MPF10 #K700
0:19
BenJi Mobile Channel
Рет қаралды 3,4 МЛН
What % of charge do you have on phone?🔋
0:11
Diana Belitskay
Рет қаралды 296 М.