Slide 1

Slide 1 text

Git based application deployment patterns for Kubernetes Git ❤ K8s

Slide 2

Slide 2 text

Shahidh K Muhammed @shahidh_k

Slide 3

Slide 3 text

Git ● Distributed version control system ● Manage source code ● Any text files can be tracked ● Collaboration

Slide 4

Slide 4 text

Git - Source of Truth ● Infrastructure as Code ○ Terraform, CloudFormation ● System Configuration as Code ○ Ansible ○ Chef ○ Puppet ● Application Configuration as Code ○ Kubernetes ○ Hasura ● Application Source Code

Slide 5

Slide 5 text

Declarative tools ❤ Git

Slide 6

Slide 6 text

Ops ● Configure, build, test, deploy ● CI/CD ● Monitor, fix ● Upgrades ● Rollbacks ● Automation

Slide 7

Slide 7 text

GitOps ● Ops practices using Git ● Use Git as source of truth ● Drive operations through git repo ● Get version control, history, peer review, and rollback ● Continuous delivery - Automated pipelines ● Webhooks: push to trigger build/test ● PRs & merge branch to deploy

Slide 8

Slide 8 text

GitOps - Patterns ● CI builds artifacts ● Updates config (in a git repo) ● Trigger rollout (PR merge/commit) ● Observe ● Control

Slide 9

Slide 9 text

GitOps - Patterns Source: Weave Works

Slide 10

Slide 10 text

GitOps - Patterns ● Use declarative configuration to define application and services ● All changes go through git review process, none using kubectl ● Use an operator in the cluster to drive observed state to desired state, as declared by the configuration in git ● pre-push hook to create manifests ○ Render templates for correct env ○ Secrets ● pre-receive hook or webhooks to build artifacts and do kubectl set-image ● Power to developer ● Own tooling

Slide 11

Slide 11 text

Shahidh K Muhammed @shahidh_k Thanks for listening! Questions?