GitOps in a nutshell (Montreal CNCF meetup May 2024)

LucienBoix 14 views 25 slides Mar 01, 2025
Slide 1
Slide 1 of 25
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25

About This Presentation

Find out what GitOps is exactly, and how to use it with a Kubernetes cluster, through this Lightning Talk where all the necessary will be explained to you : genesis, pillars, real use cases and finally a visual and practical example of a GitOps flow.

The goal here is to give you the best possible ...


Slide Content

GitOps in a nutshell Lucien Boix

Lucien Boix 38 ans, both French and Canadian From Lyon (France) Living since 2013 in Montreal (Canada) DevOps Specialist (SRE) at 360.Agency Tools and hundreds of websites for car dealerships across all Canada ‹#›

‹#› Quick timeline

Quick timeline ‹#› 2013 2014 2017 Release of Docker Release of Kubernetes The term “ GitOps ” first appeared in 2017 in a blog post by Alexis Richardson (co-founder and CEO of Weaveworks, which closed in 2024)

It’s a methodology for developer tooling to drive operations . This post discussed the use of declarative tools and best practices of configurations being code and therefore should be version controlled. ‹#›

Story in 2016 at Weaveworks Risky planned change Kubernetes clusters wiped in AWS The entire stack was rebuilt in 45 minutes All configurations were in Git They were pushing themselves to do it 1 change in production = 1 commit "Why not automate it?" ‹#›

GitOps Principles v1.0.0 ( lien ) in 2021 ‹#› The 4 pillars of GitOps

The 4 pillars in GitOps ‹#› Declarative The desired state of the system is defined declaratively Versioned & immutable The desired state of the system is versioned in Git Approved changes are automatically applied to the the system by an agent (running inside the system) Automatic pull This agent (running inside the system) also detects and corrects the drift Reconciliation

‹#› GitOps with Kubernetes

GitOps tools for Kubernetes FluxCD (open source) Created by Weaveworks Given to the CNCF in 2019 Light, no UI, notifications (Slack, Teams, Discord, etc.) Can watch multiple repos (Sources) Abundant documentation For a quick try : flux2-lite (open source) ‹#›

ArgoCD (open source) More developer centered than Flux (which is more SRE), UI out of the box More features (manual sync, maintenance window) Jenkins X (open source) GitOps tools for Kubernetes ‹#›

‹#› GitOps in practice

Here is the scope of our example ‹#›

3 colleagues are working on this app Wants to deploy a new release of the app Wants to tune the allocated resources By slightly increasing the memory limit Wants to change an environment variable Turning off the cache for a test ‹#›

‹#›

If previous embedded video is broken or does not play, use this link: https://www.youtube.com/watch?v=_m_-TWw6i2A ‹#›

‹#› Takeaways

Takeaways GitOps is a philosophy (best practices) for managing, deploying and monitoring containers GitOps also changes the way of working in a company Developers have ownership of the lifecycle of their applications We are required to communicate (through MR or PR) Collaboration, reviews, knowledge sharing ‹#›

Takeaways Improved productivity Fewer errors, lower costs No need to involve another team for deployment / rollback , fewer procedures / runbooks Enhanced security Native audit from Git, everything is traceable Simple permissions management (GitLab, GitHub, etc.) ‹#›

Takeaways In the end: a good balance between control and delivery speed A few best practices commit ID in the name of the built image pipeline does not have direct access to the system pipeline runs syntax tests s ecrets are stored in a vault ‹#›

‹#› Going further

Auto-Image Update The agent scans the registry according to our rules Minor release for a dependency (nginx, etc.) If a new image is uploaded, the agent deploys it Using a commit / push of course Going further ‹#›

Going further Exploring Infrastructure As Code ( IaC ) in general Philosophy : no more manual setup Brings reliability, visibility, reduces costs We can also manage changes with a Git repository for : Infrastructure (instances setup) Network (routing rules, firewalls) Access (list of authorized accounts) M onitoring ‹#›

Thank you ! Any question? https://www.linkedin.com/in/lucienboix/ ‹#›

Credits This slide template was created and made available for free by SlidesCarnival ‹#›