SlideShare a Scribd company logo
GITOPS
23.10.2020
the Kubernetes way
IMAGE GOES OVER HERE
ANDREA PANISSON
● Cloud native engineer & Kubernetes expert @ Sparkfabrik
https://www.sparkfabrik.com
● Certified Kubernetes Application Developer (CKAD)
andrea.panisson@sparkfabrik.com
The session:
● Some basic concepts
● GitOps? what is it?
● The GitOps “tools”
● The GitOps pipeline
● Conclusions
THE BASICS OF CICD - KUBERNETES - DECLARATIVE MODEL
WHAT IS GIT?
THE BASICS: GIT
The most widely used modern
version control system in the world
today.
More one GIT: https://www.atlassian.com/git/tutorials/what-is-git
CI: Continuous
Integration
● A software development practice where all developers merge
code changes in a central repository (Git).
● Each change in code (commit) triggers an automated
build-and-test stage for the given repo and provides feedback
to the developer(s) who made the change.
● Automates the build and unit test process of new code
changes
THE BASICS: CICD
CD: Continuous
Delivery
THE BASICS: CICD
More one CONTINUOUS DELIVERY: https://en.wikipedia.org/wiki/Continuous_delivery
A software engineering approach in which
teams produce software in short cycles,
ensuring that the software can be reliably
released at any time and, when releasing
the software, doing so manually.
CD: Continuous
Deployments
THE BASICS: CICD
More one CONTINUOUS DEPLOYMENTS: https://en.wikipedia.org/wiki/Continuous_deployment
A software engineering approach in which
software functionalities are delivered
frequently through automated deployments.
GITOPS
CICD
Continuous Integration
+
Continuous Delivery / Deployment
KUBERNETES
THE BASICS: KUBERNETES
Kubernetes is a portable, extensible,
open-source platform for managing
containerized workloads and services, that
facilitates both declarative configuration
and automation.
More one KUBERNETES: https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
Imperative model
You describe a sequence of instructions to
manipulate the state of the system to reach your
desired state
THE BASICS: DECLARATIVE MODEL
Declarative model
You describe what you want to be achieved, as
opposed to how to get there
An Imperative vs. Declarative Remote Control
https://livebook.manning.com/book/gitops-and-kubernetes/chapter-1/v-6/163
KUBERNETES
Controllers
DECLARATIVE MODEL AND K8S CONTROLLERS
Controllers are control loops that watch the
state of your cluster, then make or request
changes where needed.
Each controller tries to move the current
cluster state closer to the desired state.
The desired state is what is described
declaratively in the resource’s manifest.
More one K8S CONTROLLERS: https://kubernetes.io/docs/concepts/architecture/controller/
G I T O P S
What is
GitOps?
GITOPS
More one GITOPS: https://www.gitops.tech/
Is a way of implementing Continuous
Deployment / Delivery for cloud
native applications.
It focuses on a developer-centric
experience when operating
infrastructure, by using tools
developers are already familiar with,
including Git and Continuous
Deployment tools.
GITOPS
“Gitops is a distillation of best practices for managing
the deployment of containerized applications as well
as the cluster infrastructure upon which they run”
https://aws.amazon.com/it/blogs/containers/help-us-write-a-new-chapter-for-gitops-kubernetes-and-open-source-collaboration/
G I T O P S P R I N C I P L E S
GITOPS PRINCIPLES
https://gitops-community.github.io/kit/#the-4-principles-of-gitops
GITOPS PRINCIPLES
1
https://gitops-community.github.io/kit/#the-4-principles-of-gitops
GITOPS PRINCIPLES
System is
described
declaratively
It allows to describe the entire system
(services and applications) as configuration
code.
Kubernetes, given its declarative nature and
the controller pattern, is a perfect tool to do
GitOps.
GITOPS PRINCIPLES
2
https://gitops-community.github.io/kit/#the-4-principles-of-gitops
1
GITOPS PRINCIPLES
● Git as the single source of truth of the system
● Git as the single place where we operate (create,
change and destroy) all environments
GITOPS PRINCIPLES
1 2 3
GITOPS PRINCIPLES
Changes can be
automatically
applied
Responsible of the automation is a GitOps
Operator.
It’s a Kubernetes operator, a server-side
controller, that read the desired state of a
system (i.e. the manifests in a git repo) and
continually tries to make the actual state of
the system match those manifests.
GITOPS PRINCIPLES
1 2 3 4
GITOPS
What do I need to do GitOps in K8s?
GITOPS
What do I need to do GitOps in K8s?
G I T O P S O P E R A T O R S
● Flux is an open source project that was originally
developed by Weave Works, the same company that
coined the term GitOps
● FluxCD is a declarative deployment automation tool
which is controlled by means of its CLI, fluxctl
● Is a CNCF sandbox project since august 2019
● The new version of Flux (Flux V2) is in actual
development and almost production ready (roadmap)
and is based on the GitOps Toolkit
Flux CD
GITOPS IN PRACTICE
https://fluxcd.io/
● Argo CD is a declarative GitOps continuous delivery
tool for Kubernetes and one of the 4 Argo Projects (a
set of Kubernetes-native tools for deploying and
running jobs and applications).
● includes a command line tool and an excellent
graphical user interface
● Developed by Intuit (a large a large American business
and financial software company), is a CNCF incubator
project since april 2020
● Focused on enterprise use-cases (security, RBAC,
SSO, centralized multi-tenancy multi-cluster
management)
Argo CD
GITOPS IN PRACTICE
https://argoproj.github.io/projects/argo-cd
● Jenkins X is a CI/CD solution for modern cloud
applications on Kubernetes, an open source
opinionated way to do continuous delivery with
Kubernetes, natively
● Is a free open source tool with enterprise support
offered by Cloudbees
● it can handle all parts of the GitOps process, it’s an
all-in-one solution
Jenkins-x
GITOPS IN PRACTICE
https://www.cloudbees.com/jenkins-x/what-is-jenkins-x
● Gitlab 13.4 (september 2020) integrated the
Kubernetes Agent (as premium only feature)
● It’s the first attempt to integrate GitOps CD in Gitlab CI,
implemented as a Kubernetes operator running inside
the cluster
● It’s based on Argo GitOps Engine
GitLab EE
GITOPS IN PRACTICE
https://docs.gitlab.com/ee/user/clusters/agent/
Let’s talk about CICD pipeline and GitOps
CICD PIPELINE AND GITOPS
A tipical Kubernetes CI/CD pipeline (the push model)
Jenkins CircleCI Travis CI GitLab GitHub Actions
Application
Repository
Image
registry
Build Pipeline
Trigger
Push
images
on
registry
Deploy Environment
CI CDDevelopers
CICD PIPELINE AND GITOPS
A tipical Kubernetes CI/CD pipeline (the push model)
Jenkins CircleCI Travis CI GitLab GitHub Actions
Application
Repository
Image
registry
Build Pipeline
Trigger
Push
images
on
registry
Deploy Environment
CI CDDevelopers
CI TOOL PUSH
CHANGES IN
PRODUCTION
CICD PIPELINE AND GITOPS
https://www.gitops.tech/#pull-based-deployments
The GitOps pull-based model for CD
CI CD
CICD PIPELINE AND GITOPS
https://www.gitops.tech/#pull-based-deployments
The GitOps pull-based model for CD
CI CD
CICD PIPELINE AND GITOPS
https://www.gitops.tech/#pull-based-deployments
The GitOps pull-based model for CD
CI CD
CICD PIPELINE AND GITOPS
https://www.gitops.tech/#pull-based-deployments
The GitOps pull-based model for CD
CI CD
GITOPS BENEFITS
GitOps benefits
● Improve system observability: allow running state and desired state to be
observable
● Improve security: no need to expone to internet K8s API server or to give access
to developers to the application cluster.
● Simpler disaster recovery and rollback procedure which is consistent with the
normal deployment experience (git revert commit)
● Increased Productivity: what can be described can be automated - continuous
deployment automation with an integrated feedback control loop via the operator
GITOPS THE BAD
GitOps: the bad and the ugly
● You need to structure the environment repo and your pipelines to prevent
concurrent push on the same repo (since remote may be out of sync): multiple
CI processes can end up writing to the same GitOps repo, causing conflicts or
errors. This is may happen for example if you have configured a single repository
environment to describe describe all applications deployed in a given cluster
(Flux CD V1 for example supported only one env repo)
● Doesn’t give you an opinionated way to deal with secret management (Git
repositories are not great places to store secrets, as you have to encrypt and
decrypt them)
https://blog.container-solutions.com/gitops-limitations
https://www.reddit.com/r/kubernetes/comments/imgqoj/gitops_the_bad_and_the_ugly/
GITOPS : Some suggestions?
GitOps - Suggestions?
● Use two repos: one for app source code, another for manifests.
● Never store secrets or keys in manifests repo as plain text and yes, base64 is
plain text! (plan how to manage secrets)
RESOURCES
WEB SITES
https://www.gitops.tech/
https://gitops-community.github.io/kit/#what-is-gitops
https://www.weave.works/blog/category/gitops/
https://www.weave.works/technologies/gitops-frequently-asked-questions/
https://www.weave.works/technologies/gitops/
SLIDES
https://www.slideshare.net/weaveworks/continuous-lifecycle-london-2018-event-keynote-97418556
BOOKS:
https://www.gitops.tech/
https://www.manning.com/books/gitops-and-kubernetes
THANK YOU!

More Related Content

PDF
ArgoCD Meetup PPT final.pdf
PDF
GitOps and ArgoCD
PDF
Gitops Hands On
PDF
GitOps with ArgoCD
PDF
GitOps 101 Presentation.pdf
PDF
Gitlab, GitOps & ArgoCD
PDF
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
PDF
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
ArgoCD Meetup PPT final.pdf
GitOps and ArgoCD
Gitops Hands On
GitOps with ArgoCD
GitOps 101 Presentation.pdf
Gitlab, GitOps & ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura

What's hot (20)

PDF
The Power of GitOps with Flux & GitOps Toolkit
PDF
Gitops: a new paradigm for software defined operations
PDF
CD using ArgoCD(KnolX).pdf
PDF
The journey to GitOps
PPTX
Meetup 23 - 03 - Application Delivery on K8S with GitOps
PPTX
GitOps - Modern best practices for high velocity app dev using cloud native t...
PPTX
GitOps w/argocd
PDF
CI:CD in Lightspeed with kubernetes and argo cd
PPTX
Gitlab CI/CD
PDF
Continuous Lifecycle London 2018 Event Keynote
PDF
Speeding up your team with GitOps
PDF
Free GitOps Workshop + Intro to Kubernetes & GitOps
PDF
GitOps, Driving NGN Operations Teams 211127 #kcdgt 2021
PDF
Getting Started with Kubernetes
PPTX
Fundamentals of DevOps and CI/CD
PPTX
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
PDF
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
PPTX
PPTX
Kubernetes Introduction
PDF
Devops Devops Devops, at Froscon
The Power of GitOps with Flux & GitOps Toolkit
Gitops: a new paradigm for software defined operations
CD using ArgoCD(KnolX).pdf
The journey to GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOps
GitOps - Modern best practices for high velocity app dev using cloud native t...
GitOps w/argocd
CI:CD in Lightspeed with kubernetes and argo cd
Gitlab CI/CD
Continuous Lifecycle London 2018 Event Keynote
Speeding up your team with GitOps
Free GitOps Workshop + Intro to Kubernetes & GitOps
GitOps, Driving NGN Operations Teams 211127 #kcdgt 2021
Getting Started with Kubernetes
Fundamentals of DevOps and CI/CD
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Introduction
Devops Devops Devops, at Froscon
Ad

Similar to Gitops: the kubernetes way (20)

PDF
Whitepaper automating kuberneteswithgitops 1
PDF
GitOps is the best modern practice for CD with Kubernetes
PDF
GitOps and Kubernetes 1st Edition Billy Yuen Alexander Matyushentsev Jesse Su...
PDF
GitOps and Kubernetes 1st Edition Billy Yuen Alexander Matyushentsev Jesse Su...
PDF
Gitops Cookbook Second Early Release Natale Vinto Alex Soto Bueno
PPTX
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
PDF
Gitops And Kubernetes Continuous Deployment With Argo Cd Jenkins X And Flux 1...
PPTX
Cloud Native Transformation (Alexis Richardson) - Continuous Lifecycle 2018 ...
PPTX
Devops CI-CD pipeline with Containers
PDF
stackconf 2021 | GitOps: yea or nay?
PDF
Delivering Quality at Speed with GitOps
PPTX
CICD pipelines with GitOps
PDF
Free GitOps Workshop
PDF
PDF GitOps Cookbook (Third Early Release) Natale Vinto download
PDF
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
PDF
Unlocking GitOps Excellence Harnessing ArgoCD for Seamless Operations
PDF
Next Level DevOps Implementation with GitOps
PDF
GitOps Cookbook (Third Early Release) Natale Vinto
PPTX
Cloud Native Apps with GitOps
PDF
Intro to Kubernetes & GitOps Workshop
Whitepaper automating kuberneteswithgitops 1
GitOps is the best modern practice for CD with Kubernetes
GitOps and Kubernetes 1st Edition Billy Yuen Alexander Matyushentsev Jesse Su...
GitOps and Kubernetes 1st Edition Billy Yuen Alexander Matyushentsev Jesse Su...
Gitops Cookbook Second Early Release Natale Vinto Alex Soto Bueno
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Gitops And Kubernetes Continuous Deployment With Argo Cd Jenkins X And Flux 1...
Cloud Native Transformation (Alexis Richardson) - Continuous Lifecycle 2018 ...
Devops CI-CD pipeline with Containers
stackconf 2021 | GitOps: yea or nay?
Delivering Quality at Speed with GitOps
CICD pipelines with GitOps
Free GitOps Workshop
PDF GitOps Cookbook (Third Early Release) Natale Vinto download
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Unlocking GitOps Excellence Harnessing ArgoCD for Seamless Operations
Next Level DevOps Implementation with GitOps
GitOps Cookbook (Third Early Release) Natale Vinto
Cloud Native Apps with GitOps
Intro to Kubernetes & GitOps Workshop
Ad

More from sparkfabrik (20)

PDF
Talks on my machine: Drupal, Storybook e SDC
PDF
Talks on my machine: Drupal CMS versus The Cool Kids
PDF
Talks on my machine: Drupal: AI e Typesense come integrare la ricerca semantica
PDF
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
PDF
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
PDF
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
PDF
2023 - Drupalcon - How Drupal builds your pages
PDF
2023 - TAC23 - Agile HR - Racconti dal fronte
PDF
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
PDF
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
PDF
UX e Web sostenibile (UXday 2023).pdf
PDF
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
PDF
Deep dive nella supply chain della nostra infrastruttura cloud
PDF
KCD Italy 2022 - Application driven infrastructure with Crossplane
PDF
Come Drupal costruisce le tue pagine
PDF
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
PDF
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
PPTX
Do you know what your Drupal is doing_ Observe it!
PDF
Progettare e sviluppare soluzioni serverless con AWS
PPTX
From React to React Native - Things I wish I knew when I started
Talks on my machine: Drupal, Storybook e SDC
Talks on my machine: Drupal CMS versus The Cool Kids
Talks on my machine: Drupal: AI e Typesense come integrare la ricerca semantica
KCD Italy 2023 - Secure Software Supply chain for OCI Artifact on Kubernetes
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
2023 - Drupalcon - How Drupal builds your pages
2023 - TAC23 - Agile HR - Racconti dal fronte
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cl...
What is the Secure Supply Chain and the Current State of the PHP Ecosystem
UX e Web sostenibile (UXday 2023).pdf
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Deep dive nella supply chain della nostra infrastruttura cloud
KCD Italy 2022 - Application driven infrastructure with Crossplane
Come Drupal costruisce le tue pagine
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing_ Observe it!
Progettare e sviluppare soluzioni serverless con AWS
From React to React Native - Things I wish I knew when I started

Recently uploaded (20)

PDF
medical staffing services at VALiNTRY
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
history of c programming in notes for students .pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Introduction to Artificial Intelligence
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Transform Your Business with a Software ERP System
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
top salesforce developer skills in 2025.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Digital Strategies for Manufacturing Companies
PDF
System and Network Administraation Chapter 3
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
medical staffing services at VALiNTRY
Computer Software and OS of computer science of grade 11.pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
history of c programming in notes for students .pptx
How to Migrate SBCGlobal Email to Yahoo Easily
Introduction to Artificial Intelligence
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Transform Your Business with a Software ERP System
2025 Textile ERP Trends: SAP, Odoo & Oracle
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
CHAPTER 2 - PM Management and IT Context
top salesforce developer skills in 2025.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Digital Strategies for Manufacturing Companies
System and Network Administraation Chapter 3
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025

Gitops: the kubernetes way

  • 2. IMAGE GOES OVER HERE ANDREA PANISSON ● Cloud native engineer & Kubernetes expert @ Sparkfabrik https://www.sparkfabrik.com ● Certified Kubernetes Application Developer (CKAD) [email protected]
  • 3. The session: ● Some basic concepts ● GitOps? what is it? ● The GitOps “tools” ● The GitOps pipeline ● Conclusions
  • 4. THE BASICS OF CICD - KUBERNETES - DECLARATIVE MODEL
  • 5. WHAT IS GIT? THE BASICS: GIT The most widely used modern version control system in the world today. More one GIT: https://www.atlassian.com/git/tutorials/what-is-git
  • 6. CI: Continuous Integration ● A software development practice where all developers merge code changes in a central repository (Git). ● Each change in code (commit) triggers an automated build-and-test stage for the given repo and provides feedback to the developer(s) who made the change. ● Automates the build and unit test process of new code changes THE BASICS: CICD
  • 7. CD: Continuous Delivery THE BASICS: CICD More one CONTINUOUS DELIVERY: https://en.wikipedia.org/wiki/Continuous_delivery A software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time and, when releasing the software, doing so manually.
  • 8. CD: Continuous Deployments THE BASICS: CICD More one CONTINUOUS DEPLOYMENTS: https://en.wikipedia.org/wiki/Continuous_deployment A software engineering approach in which software functionalities are delivered frequently through automated deployments.
  • 10. KUBERNETES THE BASICS: KUBERNETES Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. More one KUBERNETES: https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
  • 11. Imperative model You describe a sequence of instructions to manipulate the state of the system to reach your desired state THE BASICS: DECLARATIVE MODEL Declarative model You describe what you want to be achieved, as opposed to how to get there
  • 12. An Imperative vs. Declarative Remote Control https://livebook.manning.com/book/gitops-and-kubernetes/chapter-1/v-6/163
  • 13. KUBERNETES Controllers DECLARATIVE MODEL AND K8S CONTROLLERS Controllers are control loops that watch the state of your cluster, then make or request changes where needed. Each controller tries to move the current cluster state closer to the desired state. The desired state is what is described declaratively in the resource’s manifest. More one K8S CONTROLLERS: https://kubernetes.io/docs/concepts/architecture/controller/
  • 14. G I T O P S
  • 15. What is GitOps? GITOPS More one GITOPS: https://www.gitops.tech/ Is a way of implementing Continuous Deployment / Delivery for cloud native applications. It focuses on a developer-centric experience when operating infrastructure, by using tools developers are already familiar with, including Git and Continuous Deployment tools.
  • 16. GITOPS “Gitops is a distillation of best practices for managing the deployment of containerized applications as well as the cluster infrastructure upon which they run” https://aws.amazon.com/it/blogs/containers/help-us-write-a-new-chapter-for-gitops-kubernetes-and-open-source-collaboration/
  • 17. G I T O P S P R I N C I P L E S
  • 20. GITOPS PRINCIPLES System is described declaratively It allows to describe the entire system (services and applications) as configuration code. Kubernetes, given its declarative nature and the controller pattern, is a perfect tool to do GitOps.
  • 22. GITOPS PRINCIPLES ● Git as the single source of truth of the system ● Git as the single place where we operate (create, change and destroy) all environments
  • 24. GITOPS PRINCIPLES Changes can be automatically applied Responsible of the automation is a GitOps Operator. It’s a Kubernetes operator, a server-side controller, that read the desired state of a system (i.e. the manifests in a git repo) and continually tries to make the actual state of the system match those manifests.
  • 26. GITOPS What do I need to do GitOps in K8s?
  • 27. GITOPS What do I need to do GitOps in K8s?
  • 28. G I T O P S O P E R A T O R S
  • 29. ● Flux is an open source project that was originally developed by Weave Works, the same company that coined the term GitOps ● FluxCD is a declarative deployment automation tool which is controlled by means of its CLI, fluxctl ● Is a CNCF sandbox project since august 2019 ● The new version of Flux (Flux V2) is in actual development and almost production ready (roadmap) and is based on the GitOps Toolkit Flux CD GITOPS IN PRACTICE https://fluxcd.io/
  • 30. ● Argo CD is a declarative GitOps continuous delivery tool for Kubernetes and one of the 4 Argo Projects (a set of Kubernetes-native tools for deploying and running jobs and applications). ● includes a command line tool and an excellent graphical user interface ● Developed by Intuit (a large a large American business and financial software company), is a CNCF incubator project since april 2020 ● Focused on enterprise use-cases (security, RBAC, SSO, centralized multi-tenancy multi-cluster management) Argo CD GITOPS IN PRACTICE https://argoproj.github.io/projects/argo-cd
  • 31. ● Jenkins X is a CI/CD solution for modern cloud applications on Kubernetes, an open source opinionated way to do continuous delivery with Kubernetes, natively ● Is a free open source tool with enterprise support offered by Cloudbees ● it can handle all parts of the GitOps process, it’s an all-in-one solution Jenkins-x GITOPS IN PRACTICE https://www.cloudbees.com/jenkins-x/what-is-jenkins-x
  • 32. ● Gitlab 13.4 (september 2020) integrated the Kubernetes Agent (as premium only feature) ● It’s the first attempt to integrate GitOps CD in Gitlab CI, implemented as a Kubernetes operator running inside the cluster ● It’s based on Argo GitOps Engine GitLab EE GITOPS IN PRACTICE https://docs.gitlab.com/ee/user/clusters/agent/
  • 33. Let’s talk about CICD pipeline and GitOps
  • 34. CICD PIPELINE AND GITOPS A tipical Kubernetes CI/CD pipeline (the push model) Jenkins CircleCI Travis CI GitLab GitHub Actions Application Repository Image registry Build Pipeline Trigger Push images on registry Deploy Environment CI CDDevelopers
  • 35. CICD PIPELINE AND GITOPS A tipical Kubernetes CI/CD pipeline (the push model) Jenkins CircleCI Travis CI GitLab GitHub Actions Application Repository Image registry Build Pipeline Trigger Push images on registry Deploy Environment CI CDDevelopers CI TOOL PUSH CHANGES IN PRODUCTION
  • 36. CICD PIPELINE AND GITOPS https://www.gitops.tech/#pull-based-deployments The GitOps pull-based model for CD CI CD
  • 37. CICD PIPELINE AND GITOPS https://www.gitops.tech/#pull-based-deployments The GitOps pull-based model for CD CI CD
  • 38. CICD PIPELINE AND GITOPS https://www.gitops.tech/#pull-based-deployments The GitOps pull-based model for CD CI CD
  • 39. CICD PIPELINE AND GITOPS https://www.gitops.tech/#pull-based-deployments The GitOps pull-based model for CD CI CD
  • 40. GITOPS BENEFITS GitOps benefits ● Improve system observability: allow running state and desired state to be observable ● Improve security: no need to expone to internet K8s API server or to give access to developers to the application cluster. ● Simpler disaster recovery and rollback procedure which is consistent with the normal deployment experience (git revert commit) ● Increased Productivity: what can be described can be automated - continuous deployment automation with an integrated feedback control loop via the operator
  • 41. GITOPS THE BAD GitOps: the bad and the ugly ● You need to structure the environment repo and your pipelines to prevent concurrent push on the same repo (since remote may be out of sync): multiple CI processes can end up writing to the same GitOps repo, causing conflicts or errors. This is may happen for example if you have configured a single repository environment to describe describe all applications deployed in a given cluster (Flux CD V1 for example supported only one env repo) ● Doesn’t give you an opinionated way to deal with secret management (Git repositories are not great places to store secrets, as you have to encrypt and decrypt them) https://blog.container-solutions.com/gitops-limitations https://www.reddit.com/r/kubernetes/comments/imgqoj/gitops_the_bad_and_the_ugly/
  • 42. GITOPS : Some suggestions? GitOps - Suggestions? ● Use two repos: one for app source code, another for manifests. ● Never store secrets or keys in manifests repo as plain text and yes, base64 is plain text! (plan how to manage secrets)