Denis Maggiorotto

Sunnyvale S.r.l.
Kubernetes GitOps
Featuring GitHub, ArgoCD and Kustomize
@Home

05/11/2020
Kubernetes GitOps
featuring GitHub, Kustomize and ArgoCD
About me
Denis Maggiorotto
• CTO and shareholder @ Sunnyvale S.r.l.
• 20 years of experience in IT consulting
• Senior Software / Enterprise Architect @ Major companies in public utility,
telco, TV broadcasting and banking sector
• Oracle University Principal Instructor regarding Java technologies (Micro
Edition, Standard Edition and Enterprise Edition) and Oracle's middleware
products.
• Cloud/DevOps Engineer
• Independent IT professional trainer and public speaker
What is GitOps?
GitOps is a standardised workflow for how to deploy,
configure, monitor, update and manage infrastructure-as-
code
Core idea is having a Git repository that contains
declarative descriptions of the infrastructure desired in
the production environment and an automated process to
make production environment match the described state in
the repository
GitOps operation model
GitOps operation model
GitOps operation model
GitOps operation model
GitOps operation model
GitOps operation model
GitOps operation model
GitOps operation model
GitOps principales
• The entire system is described declaratively

• The canonical desired system state is versioned (Git)

• Approved changes to the desired state are (automatically)
applied to the system

• Software agents ensure correctness, feedback and alert on
synchronizations/divergences
Tools
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
java-hello-world sample app
WEB server is up! http://localhost:8080/greet
$ java 
-cp "./target/libs/*:target/*" 
it.sunnyvale.java.helloworld.Main
{"message":" World v.snapshot from host MyPCName! I'm
running in local!"}
$ curl -s http://localhost:8080/greet
• snapshot: the running application version (env. variable)
• MyPCName: the host name where the app is running
• local: the environment name (env. variable)
Code Pipeline
Developer Code repo (GitHub)
CI/CD 

(GitHub Action)
Docker registry
Config review /

Merge
Code branching strategy
java-hello-world app release
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/sunnyvale-academy/java-hello-world.git
* [new tag] 3.0 -> 3.0
$ export TAG=3.0 && git tag $TAG && git push origin $TAG
1) Build

2) Test

3) Jar

4) Docker build

5) Docker push
Delivery process automation
We automated the release process, can we automate the
delivery too? Yes, with GitOps practices!
Config pipeline
DevOps Config repo (GitHub)
K8S native CI/CD 

(ArgoCD)
Kubernetes
Docker Registry
Push / 

Pull request
Config review /

Merge
Pull config Sync
Pull images
Slack
NotifyFeedback
Example workflow
Config branching strategy
Pull
request /
Merge
Pull
request /
Merge
Pull
request /
Merge
Multi-environment K8S manifest
service-dev.yaml
service-test.yaml
service-prod.yaml
deployment-dev.yaml
deployment-test.yaml
deployment-prod.yaml
ingress-dev.yaml
ingress-test.yaml
ingress-prod.yaml
configmap—dev.yaml
configmap-test.yaml
configmap-prod.yaml
$ ls -1 java-hello-world-config
…
replicas: 2
…
apiVersion: apps/v1
kind: Deployment
metadata:
name: java-hello-world
spec:
replicas: 0
template:
spec:
containers:
- image: dennydgl1/java-hello-
world:1.0
…
Base
Overlay /

Patch
Avoid this
The ’s way
$ cat overlays/deployment/deployment.yaml
$ cat base/deployment.yaml
Config repo content
java-hello-world-config
├── base
│ ├── configmap.yaml
│ ├── deployment.yaml
│ ├── kustomization.yaml
│ └── service.yaml
└── overlays
├── development
│ ├── application.yaml
│ ├── deployment-patch.yaml
│ ├── env.properties
│ ├── ingress.yaml
│ ├── kustomization.yaml
│ └── namespace.yaml
├── production
│ ├── application.yaml
│ ├── deployment-patch.yaml
│ ├── env.properties
│ ├── ingress.yaml
│ ├── kustomization.yaml
│ └── namespace.yaml
└── staging
├── application.yaml
├── deployment-patch.yaml
├── env.properties
├── ingress.yaml
├── kustomization.yaml
└── namespace.yaml
$ tree java-hello-world-config
Base
Development
overlay
Production
overlay
Staging
overlay
Base dir contains the “base”
manifests
Each overlay contains the
base manifests' specialisation
for the environment (dev,
staging, prod). Specialisation
means only the differences
against the one in base.
Thanks to Kustomize we
benefit from manifest code
reuse between environments!
Release 3.0 in development env
$ git checkout master
$ git branch feature-30
$ perl -p -i -e 's/newTag: "2.1"/newTag: "3.0"/g' overlay/developmnt/
kustomization.yaml
$ git add . && git commit -m "Release 3.0" && git push
$ git checkout master
$ git merge feature-30
master branchdevelopment branch
Pull request / Merge
(1) Change the app release for dev env
(2) Actuate changes on the environment
Desired state to actual state sync
Argo CD follows the GitOps pattern of using Git
repositories as the source of truth for defining the
desired application state on K8S. Kubernetes
manifests can be specified in several ways,
Kustomize is one of them!
Argo CD pulls a Git branch and synchronise the
app in K8S accordingly.
Release 3.0 in development env
Get feedbacks from the infrastructure
Argo CD integrates with Slack and
send you messages about
synchronisations it makes
Release 3.0 in development env
{
"message":"Hello World v.3.0 from host development-
java-hello-world-59dfb6b554-mz4qs! I'm running in
development!”
}
$ curl -s http://development.app.127-0-0-1.nip.io/greet
Rollback 2.1 in development env
GitOps benefits
• Auditing and attribution

• Separation of concerns

• No crossing security boundary

• Process & constraints enforcement

• Great software human collaboration point

• Easy to validate for correctness (policies)

• System can self heal
https://github.com/sunnyvale-academy/java-hello-world
https://github.com/sunnyvale-academy/java-hello-world-config
Source code is available on GitHub
• https://www.gitops.tech
• https://github.com/weaveworks/awesome-gitops
• https://thenewstack.io/what-is-gitops-and-why-it-might-be-the-nextbig-thing-for-devops/
Resources
Thanks!
github.com/denismaggior8
Denis Maggiorotto
denis.maggiorotto@sunnyvale.it
www.linkedin.com/in/denismaggiorotto
twitter.com/denismaggior8
github.com/sunnyvale-academy
github.com/sunnyvale-it

More Related Content

PDF
Gitlab, GitOps & ArgoCD
PDF
Gitops: the kubernetes way
PDF
Introduction to GitHub Actions
PDF
GitOps with ArgoCD
PDF
Intro to GitOps & Flux.pdf
PDF
Designing a complete ci cd pipeline using argo events, workflow and cd products
PDF
Introduction of Kubernetes - Trang Nguyen
PDF
CD using ArgoCD(KnolX).pdf
Gitlab, GitOps & ArgoCD
Gitops: the kubernetes way
Introduction to GitHub Actions
GitOps with ArgoCD
Intro to GitOps & Flux.pdf
Designing a complete ci cd pipeline using argo events, workflow and cd products
Introduction of Kubernetes - Trang Nguyen
CD using ArgoCD(KnolX).pdf

What's hot (20)

PPTX
Meetup 23 - 03 - Application Delivery on K8S with GitOps
PDF
Gitops: a new paradigm for software defined operations
PDF
ArgoCD Meetup PPT final.pdf
PDF
Gitlab ci, cncf.sk
PDF
GitOps with Gitkube
PPTX
GitOps w/argocd
PPTX
Introduction to GItlab CICD Presentation.pptx
PDF
GitOps 101 Presentation.pdf
PDF
"DevOps > CI+CD "
PPTX
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
PDF
Introducing GitLab (June 2018)
PDF
Gitops Hands On
PPTX
Gitlab CI/CD
PDF
CI:CD in Lightspeed with kubernetes and argo cd
PPTX
CI/CD Best Practices for Your DevOps Journey
PDF
Gitlab ci-cd
PPTX
Fundamentals of DevOps and CI/CD
PDF
GitOps and ArgoCD
PDF
Kubernetes Application Deployment with Helm - A beginner Guide!
PPTX
GitLab.pptx
Meetup 23 - 03 - Application Delivery on K8S with GitOps
Gitops: a new paradigm for software defined operations
ArgoCD Meetup PPT final.pdf
Gitlab ci, cncf.sk
GitOps with Gitkube
GitOps w/argocd
Introduction to GItlab CICD Presentation.pptx
GitOps 101 Presentation.pdf
"DevOps > CI+CD "
What is DevOps? | DevOps Introduction | DevOps Tools | DevOps Tutorial For Be...
Introducing GitLab (June 2018)
Gitops Hands On
Gitlab CI/CD
CI:CD in Lightspeed with kubernetes and argo cd
CI/CD Best Practices for Your DevOps Journey
Gitlab ci-cd
Fundamentals of DevOps and CI/CD
GitOps and ArgoCD
Kubernetes Application Deployment with Helm - A beginner Guide!
GitLab.pptx
Ad

Similar to Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD (20)

PDF
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
PPTX
Introduction to git and Github
PDF
gitopsthekubernetesway-201026090439.pdf
PDF
Unlocking GitOps Excellence Harnessing ArgoCD for Seamless Operations
PDF
The journey to GitOps
PPTX
Mini-training: Let’s Git It!
PPTX
git github PPT_GDSCIIITK.pptx
PDF
Speeding up your team with GitOps
PDF
Git ops & Continuous Infrastructure with terra*
PDF
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
PPTX
GitHub and Open Source - GDGoC MIT Anna University
PDF
GitOps Cookbook (Third Early Release) Natale Vinto
PPTX
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
PDF
Delivering Quality at Speed with GitOps
PDF
What is GitOps? How GitOps works? we discuss Key Challanges.
PPTX
Git essential training & sharing self
PDF
How to manage Kubernetes at scale with just git
PPT
Understanding and Using Git at Eclipse
PPTX
Introduction to Git and Github
PDF
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
Introduction to git and Github
gitopsthekubernetesway-201026090439.pdf
Unlocking GitOps Excellence Harnessing ArgoCD for Seamless Operations
The journey to GitOps
Mini-training: Let’s Git It!
git github PPT_GDSCIIITK.pptx
Speeding up your team with GitOps
Git ops & Continuous Infrastructure with terra*
Development with Git and Gerrit - Eclipse DemoCamp Stuttgart - 2010-11-23
GitHub and Open Source - GDGoC MIT Anna University
GitOps Cookbook (Third Early Release) Natale Vinto
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Delivering Quality at Speed with GitOps
What is GitOps? How GitOps works? we discuss Key Challanges.
Git essential training & sharing self
How to manage Kubernetes at scale with just git
Understanding and Using Git at Eclipse
Introduction to Git and Github
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Ad

More from Sunnyvale (6)

PDF
Microservices DevOps on Google Cloud Platform
PDF
Sunnyvale Enterprise Landscape Monitoring
PDF
Ala 2.0 Keynote
PDF
Sunnyvale Adapter-Logic Application brochure
PDF
Flavio Bertini, Università "La Sapienza" - Roma: Adapter-Logic Application at
PPT
Sunnyvale Adapter-Logic Application
Microservices DevOps on Google Cloud Platform
Sunnyvale Enterprise Landscape Monitoring
Ala 2.0 Keynote
Sunnyvale Adapter-Logic Application brochure
Flavio Bertini, Università "La Sapienza" - Roma: Adapter-Logic Application at
Sunnyvale Adapter-Logic Application

Recently uploaded (20)

PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PPTX
Module 1 Introduction to Web Programming .pptx
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
PDF
substrate PowerPoint Presentation basic one
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PDF
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PPTX
Internet of Everything -Basic concepts details
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
PDF
giants, standing on the shoulders of - by Daniel Stenberg
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Module 1 Introduction to Web Programming .pptx
Electrocardiogram sequences data analytics and classification using unsupervi...
SGT Report The Beast Plan and Cyberphysical Systems of Control
MuleSoft-Compete-Deck for midddleware integrations
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
A symptom-driven medical diagnosis support model based on machine learning te...
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
substrate PowerPoint Presentation basic one
Co-training pseudo-labeling for text classification with support vector machi...
Introduction to MCP and A2A Protocols: Enabling Agent Communication
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
Internet of Everything -Basic concepts details
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
Advancing precision in air quality forecasting through machine learning integ...
EIS-Webinar-Regulated-Industries-2025-08.pdf
giants, standing on the shoulders of - by Daniel Stenberg

Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD