Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CI/CD with Kubernetes
Search
Bastian Hofmann
August 30, 2019
Programming
0
150
CI/CD with Kubernetes
Bastian Hofmann
August 30, 2019
Tweet
Share
More Decks by Bastian Hofmann
See All by Bastian Hofmann
Monitoring in Kubernetes with Prometheus and Grafana
bastianhofmann
0
280
Creating a fast Kubernetes Development Workflow
bastianhofmann
0
85
Highly available cross-region deployments with Kubernetes
bastianhofmann
1
120
From source to Kubernetes in 30 minutes
bastianhofmann
0
120
Introduction to Kubernetes
bastianhofmann
1
140
Creating a fast Kubernetes Development Workflow
bastianhofmann
1
240
Deploying your first Micro-Service application to Kubernetes
bastianhofmann
2
160
Creating a fast Kubernetes Development Workflow
bastianhofmann
0
170
Dive-In-Workshop: Kubernetes
bastianhofmann
0
420
Other Decks in Programming
See All in Programming
Introduction of Happy Eyeballs Version 2 (RFC8305) to the Socket library
coe401_
1
220
今こそ始める、CDKコンストラクトライブラリ開発 ― 入門から実践まで
tmokmss
1
930
How to use Macrobenchmark
veronikapj
0
160
ぼっちを避けて楽しむためのアノテコノテ / Various Tips and Tricks to Avoid Loneliness and Have Fun
nrslib
3
1.7k
AWS CDKにおける「再利用性」を考える / aws-cdk-reusability
gotok365
6
1.3k
APIのない大学ログインWebサービスをWKWebViewとJavaScriptでアプリ化した話
akidon0000
1
330
20240706_CDKConf
takuyay0ne
0
1.2k
Advanced App Shrinking Techniques
cbeyls
2
150
【Go言語】ジェネリクス
tomo1227
0
170
Folding Cheat Sheet #7
philipschwarz
PRO
0
150
feature環境をGitHub ActionsとCloudFormationでいい感じに管理する
nealle
2
310
CSC307 Lecture 06
javiergs
PRO
0
360
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
35
6.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
129
32k
Stop Working from a Prison Cell
hatefulcrawdad
266
20k
What's in a price? How to price your products and services
michaelherold
239
11k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
24
1.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
18
1.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
78
15k
[RailsConf 2023] Rails as a piece of cake
palkan
35
4.4k
BBQ
matthewcrist
82
9k
Ruby is Unlike a Banana
tanoku
96
10k
Designing Experiences People Love
moore
136
23k
The Language of Interfaces
destraynor
151
23k
Transcript
@BastianHofmann CI/CD with Kubernetes Bastian Hofmann
[email protected]
Continuous Integration
Continuous Delivery
None
Container orchestration platform
Deploy, run and scale your services in isolated containers
No vendor lock in
Standardized APIs
Runs on
Your laptop
None
Bare metal
Cloud Providers
And if you don't want to install and maintain Kubernetes
yourself
Managed Kubernetes
None
None
So we have code, how do we get this into
Kubernetes?
Lot's of tools
Example for this talk
None
Example application
https:/ /gitlab.com/bashofmann/ angular-test-app
https:/ /gitlab.com/bashofmann/ angular-test-app-finished
Pipeline with multiple stages, each stage can have multiple jobs
Stage 1: Preparing
Stage 2: Linters and Tests
Stage 3: Building an image
Stage 4: On master: Deploying to Kubernetes into a stage
namespace
Stage 5: On master: Testing if stage works
Stage 6: On tag: Tag the docker image
Stage 7: On tag: Deploying to Kubernetes into a prod
namespace
Stage 8: On tag: Testing if prod works
In detail
Stage 1: Preparing
Only do slow operations once and cache and re-use results
Stage 2: Linters and Tests
Add linters for everything
Unit tests
Integration tests
Browser tests
Stage 3: Building an image
Make the build as fast as possible
Make the image as small as possible
Stage 4: On master: Deploying to Kubernetes into a stage
namespace
Stage 5: On master: Testing if stage works
Stage 6: On tag: Tag the docker image
Stage 7: On tag: Deploying to Kubernetes into a prod
namespace
Stage 8: On tag: Testing if prod works
Use a versioning scheme
Never deploy "latest"
Use Kubernetes namespaces
Use Helm or similar tools
Make use of Kubernetes "magic"
Sealed Secrets
Secrets are stored encrypted in Git and encrypted inside of
the cluster
LoadBalancers
Automatically creates a highly available LoadBalancer with a public IP
address
Ingress controller
The ingress controller (nginx) listens on routing rules in Ingress
Resources and configures itself to route incoming traffic to the correct running and healthy pods
cert-manager
Cert-manager listens on Ingress Resources and if they need TLS,
requests a certificate from LetsEncrypt
external-dns
External-DNS listens on Ingress Resources and creates DNS entries
Prometheus
Kubernetes and Node metrics are automatically included
Kubernetes and Node alerts are automatically included
Kubernetes and Node dashboards are automatically included
Scraping targets can be automatically discovered
Service Meshes
None
Alternatives
Flux
None
Knative
Kubernetes-based platform to deploy and manage modern serverless workloads
Tekton CD
CI that runs completely within Kubernetes with Kubernetes Custom Resources
[email protected]
https:/ /twitter.com/BastianHofmann http:/ /speakerdeck.com/u/bastianhofmann