Lessons learned using GitOps to deploy thousands of Kubernetes pods
A talk about GitOps, what it is and what benefits it brings and how Vinted utilises GitOps to deploy thousands of Kubernetes pods over more than 2k times per day.
Vinted infrastructure 3x growth over 2 years Kubernetes production stats ● All services running on Kubernetes* ● 2000+ deployments per day ● 6000+ running pods ● 300+ physical nodes (30k CPU cores; 120TB memory) *Almost
GitOps Coined in August 2017 by Weaveworks CEO Alexis Richardson GitOps is a DevOps process characterized by: Best practices of deployment, management and monitoring of containerized applications Experience for managing applications with fully automated pipelines/workflows using Git for development and operations Use of Git revision control system to track and approve changes to the infrastructure
Git strategies Single branch (multiple directories) Multiple branches Do use directories for GitOps environments kubernetes-deployments ├── demo-app │ ├── development │ ├── production │ └── staging └── guestbook ├── development ├── production └── staging Don’t use long-running branches for GitOps environments
Configuration management Helm Kustomize Package manager Go templating language Environments per values files No parameters and templates - as close as you can get to Kubernetes manifests No parameters and templates - limiting in edge cases Overlays per environment More a language than a tool JSON with comments and templating Not Kubernetes specific Jsonnet
ArgoCD Sync waves Supports application dependencies and defines deployments order Supports only definitions within same defined application Prolongs deployments Use when doing frequent deployments argocd app sync $(APP_NAME) \ --revision ${ARGOCD_APP_REVISION} Sync wave example Sync waves
GitOps is awesome Use directories for GitOps environments Separate code and configuration repositories Use common values for repetitive configuration Avoid using cross application dependencies