- What do you need to deploy microservices?
- What is Docker, Kubernetes, Infrastructure, and GitOps?
- Why can GitOps help us to improve the DevOps process?
- Demo GitOps
Jirayut Nimsaeng
Founder & CEO
Opsta (Thailand) Co., Ltd.
Google DevFest 2022
2. Jirayut Nimsaeng (Dear)
● He is Founder and CEO of Opsta (Thailand) Co.,Ltd.
● He has been involved in DevSecOps, Container, Cloud
Technology and Open Source for over 10 years.
● He is the first Certified Kubernetes Security Specialist
(CKS) and Certified Kubernetes Administrator (CKA) in
Thailand
● He is first Thai Google Cloud Developer Expert (GDE) in
Thailand
3. How long does it take to build and deploy all of these?
https://github.com/dotnet-architecture/eShopOnContainers
12. What is Kubernetes?
● Kubernetes, in Greek, means the Helmsman, or pilot of the ship,
pilot of a ship of containers
● Kubernetes is a software written in Go for automating deployment,
scaling, and management of containerized applications
● Focus on manage applications, not machines
● Open source, open API container orchestrator
● Supports multiple cloud and bare-metal environments
● Inspired and informed by 15 years of Google’s experiences and
internal systems
14. Docker & Kubernetes Life Cycle
Dockerfile
Docker Image
Kubernetes Cluster
Build
Push
Run
Pull
15. What is Google Kubernetes Engine? (GKE)
Google Kubernetes Engine (GKE) provides a managed environment for deploying,
managing, and scaling your containerized applications using Google infrastructure
with these benefits
● Single-click clusters
● A high-availability control plane including multi-zonal and regional clusters
● Auto-repair, auto-upgrade, and release channels
● Vulnerability scanning of container images and data encryption
● Integrated cloud monitoring with infrastructure, application, and
Kubernetes-specific views
25. Problem with Kubernetes Manifest
● 1 Microservice consist of:
○ Deployment
○ Service
○ Ingress
○ Configmap
○ Secret
● More effort for operate and difficult
control environment values.
● Hard to manage release (Rollback, Rollout, history).
● Hard to reuse configuration template cause
specification environment.
31. What is GitOps?
GitOps is a set of best practices where the entire code delivery
process is controlled via Git, including infrastructure and application
definition as code and automation to complete updates and rollbacks.
gitops
32. GitOps Principles v1.0.0
A system
managed by
GitOps must
have its desired
state expressed
declaratively
Desired state is
stored in a way that
enforces
immutability,
versioning and
retains a complete
version history
Software agents
automatically pull
the desired state
declarations from
the source
Software agents
continuously
observe actual
system state and
attempt to apply
the desired state
https://opengitops.dev
34. Benefits
● Better traceability
● Easier rollbacks
● The state of the cluster is always described in Git
● Safer deployments, there is no external deployment system with full
access to the cluster
● Transparent, Straightforward Auditing
● Detecting/Avoiding configuration drift
● Multi-cluster deployments
● Build Code Reviews and Collaboration Culture
gitops
35. Challenges
● Many teams will have to adjust their culture and way of working to
support using Git as the single source of truth
● There may be times when that is necessary and will require suspending
GitOps in some way
● Good testing and CI already in place
● A strategy for dealing with promotions between environments
● Secrets strategy
gitops
38. After
Git Container
Registry
CI CD
commit build
push
Git GitOps Tool
pull request
for change
continuous
pulling
DEV
UAT
PRD
sync stage
[optional] update infrastructure as code