Config management for
Kubernetes: GitOps + Helm
Tomasz Tarczyński, Gigaset
Agenda
@ttarczynski
1. Configuration Management
2. Why GitOps
3. Demo: Flux
4. Demo: Helm
5. Demo: Flux Helm Operator
Configuration Management
@ttarczynski
● Infrastructure as a Code
● GIT – as a single source of truth
● Tools:
Ansible / Chef / Puppet / Salt
Puppet
@ttarczynski
● DSL: a simple and constrained language
● Declarative: describe the desired state
● Templates: ERB
● Modules: public and private
● Code / data separation: Hiera
Kubernetes
@ttarczynski
● Control plane provides a Declarative API
● Declare the desired state
● Control plane makes sure that the actual
state converges to the desired state
Kubernetes: Why GitOps
@ttarczynski
● Can we declare all the state in GIT?
And expect the system to converge.
● Can we have something like modules?
Kubernetes: Why GitOps
@ttarczynski
● Configuration Management:
Declarative vs Imperative
GitOps: How
@ttarczynski
Kubernetes
API
push
container images
kubectl apply
pull
GitOps: How
@ttarczynski
● Flux CD: a Continuous Delivery tool
○ Runs in the cluster
○ Synchronizes the cluster state with a GIT repo
○ CNCF sandbox project
GitOps: How
@ttarczynski
Kubernetes
API
push
container images
kubectl apply
pull
GitOps: How
@ttarczynski
Kubernetes
API
Flux CD
push
container images
commit
kubectl apply
sync
pull
images metadata
apply / delete
GitOps
@ttarczynski
Demo
https://github.com/ttarczynski/gitops-demo
GitOps: Why Helm
@ttarczynski
● We declared all the state in GIT
● But can we have something like modules?
GitOps: Why Helm
@ttarczynski
● Helm: The package manager for Kubernetes
○ find, share, and use software built for Kubernetes
GitOps: Why Helm
@ttarczynski
● Manage complexity: describe complex apps
GitOps: Why Helm
@ttarczynski
● Manage complexity: describe complex apps
● Easy updates: in-place upgrades and custom hooks
GitOps: Why Helm
@ttarczynski
● Manage complexity: describe complex apps
● Easy updates: in-place upgrades and custom hooks
● Simple sharing: public / private repo
GitOps: Why Helm
@ttarczynski
● Manage complexity: describe complex apps
● Easy updates: in-place upgrades and custom hooks
● Simple sharing: public / private repo
● Rollbacks: roll back to an older version with ease
Helm
@ttarczynski
Demo
https://github.com/ttarczynski/gitops-demo
GitOps + Helm
@ttarczynski
● Flux Helm Operator:
○ automates Helm Chart releases
○ Kubernetes custom resource named HelmRelease
○ charts are released as specified in HelmRelease
Credit: https://fluxcd.io
GitOps + Helm
GitOps + Helm
@ttarczynski
Demo
https://github.com/ttarczynski/gitops-demo
GitOps
@ttarczynski
● The entire system is described declaratively
● The canonical desired system state is
versioned (with Git)
● Approved changes to the desired state are
automatically applied to the system
● Software agents ensure correctness
Agenda
@ttarczynski
1. Configuration Management
2. Why GitOps
3. Demo: Flux
4. Demo: Helm
5. Demo: Flux Helm Operator
GitOps: Flux docs
@ttarczynski
● fluxcd.io
● docs.fluxcd.io
● github.com/fluxcd/helm-operator-get-started
● github.com/ttarczynski/gitops-demo
Thanks!
Tomasz Tarczynski
@ttarczynski

Config management for kubernetes: GitOps + Helm