Florian Dambrine
I am a Freelance DevOps Engineer graduated from UTC (University of Technology of Compiègne) in 2014. I am a DevOps enthusiast embracing Cloud computing technologies to build automated infrastructure at large scale.
- Developer 101 - How to transition from ECS to K8s & Gitops
Florian Dambrine - Principal Engineer
CI/CD
Container Platform
Tooling
# Agenda
Legacy Vs New Pipeline
GitOps Workflow
Kubernetes CI/CD Workflow
# Legacy ECS
CI - Build the application JAR and run checkstyle & unit tests
Deployment Api & Router - Active ECS deployment using ecs-cli (tight coupling)
Notification - Developer feedback on Slack
CD - Docker image build and registry push
# New K8s
CI - Build the application JAR and run checkstyle & unit tests
Deployment Api & Router - Auto Versioning + GitOps Workflow (passive / decoupled)
Notification - Developer feedback on Slack
CD - Docker image build and registry push
Principles
Principles
#1 The entire system is described declaratively
#2 The canonical desired system state versioned in git
#3 Approved changes that can be automatically applied to the system
#4 Software agents ensure correctness and alert on divergence
# Key concepts
# GitOps Workflow
Push
Push
2/ Kubernetes App repository (verity-k8s-ops)
K8s Templates Repo
CI / CD
GitOps Repo
Push
Publish
1/ App repository (verity-api)
image:vX.Y.Z
Application Repo
CI / CD
Container Registry
Sync
Source of truth
Deploy Operator
K8s Cluster
image:vX.Y.Z
# K8s CI/CD Workflow
Canonical Desired States
verity-api--production
verity-api--staging
myapp:staging
myapp:v1.0.0
staging.yaml
production.yaml
verity-k8s-ops
Collection of templates
Rendering
# K8s CI/CD Workflow
verity-api--production
verity-api--staging
Canonical Desired States
verity-api--production
└── monochart
└── templates
└── deployment.yaml
verity-api--staging
└── monochart
└── templates
└── deployment.yaml
git://va-verity-eks-stage-gitops
git://va-verity-eks-prod-gitops
# K8s CI/CD Workflow
verity-api--production
└── monochart
└── templates
└── deployment.yaml
verity-api--staging
└── monochart
└── templates
└── deployment.yaml
ArgoCD
Container Platform
K8s Deployment Anatomy
# Container Platform
Service Discovery
EC2
EC2
EC2
EC2
ECS
K8s workers
EKS Control Plane (Master)
ECS World
K8s World
# Container Platform
ECS World
K8s World
Task
Task definition
Service
ReplicaSet
Deployment
Pod
Kubernetes is a lot more than a simple container scheduler, it can be seen as an automation platform to define multiple pieces of configuration or infra using YAML objects (It's a big REST API)
ECS is a fairly simple scheduler that gets the job done. It is much more lightweight in term of capabilities and requires additional work to bridge all the components together (Prometheus monitoring / Service discovery / ...)
# K8s App Anatomy
Basics
ArgoCD
# Basics
kubectl
kubectx
kubens
k9s
Official client to interact with K8s
Ease the cluster context switching (can be done with kubectl)
Ease the namespace switching (can be done with kubectl)
Interactive terminal interface that helps you navigate cluster resources
argocd
Official ArgoCD Cli that allows you to do what you do in the UI
By Florian Dambrine
Developer 101 - How to transition from ECS to K8s
I am a Freelance DevOps Engineer graduated from UTC (University of Technology of Compiègne) in 2014. I am a DevOps enthusiast embracing Cloud computing technologies to build automated infrastructure at large scale.