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
190
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
330
Creating a fast Kubernetes Development Workflow
bastianhofmann
0
110
Highly available cross-region deployments with Kubernetes
bastianhofmann
1
140
From source to Kubernetes in 30 minutes
bastianhofmann
0
160
Introduction to Kubernetes
bastianhofmann
1
140
Creating a fast Kubernetes Development Workflow
bastianhofmann
1
260
Deploying your first Micro-Service application to Kubernetes
bastianhofmann
2
180
Creating a fast Kubernetes Development Workflow
bastianhofmann
0
220
Dive-In-Workshop: Kubernetes
bastianhofmann
0
430
Other Decks in Programming
See All in Programming
フロントエンド開発に役立つクライアントプログラム共通のノウハウ / Universal client-side programming best practices for frontend development
nrslib
7
3.9k
猫と暮らすネットワークカメラ生活🐈 ~Vision frameworkでペットを愛でよう~ / iOSDC Japan 2025
yutailang0119
0
220
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
230
CSC509 Lecture 02
javiergs
PRO
0
400
Reduxモダナイズ 〜コードのモダン化を通して、将来のライブラリ移行に備える〜
pvcresin
2
680
ポスターセッション: 「まっすぐ行って、右!」って言ってラズパイカーを動かしたい 〜生成AI × Raspberry Pi Pico × Gradioの試作メモ〜
komofr
0
930
プログラミングどうやる? ~テスト駆動開発から学ぶ達人の型~
a_okui
0
190
iOSDC.pdf
chronos2500
2
660
Breaking Up with Big ViewModels — Without Breaking Your Architecture (droidcon Berlin 2025)
steliosf
PRO
1
300
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
0
370
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
750
ИИ-Агенты в каждый дом – Алексей Порядин, PythoNN
sobolevn
0
150
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Fireside Chat
paigeccino
40
3.7k
Building an army of robots
kneath
306
46k
GraphQLとの向き合い方2022年版
quramy
49
14k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
A Tale of Four Properties
chriscoyier
160
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