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
Pod autoscaling with custom-metrics
Search
Mattias Gees
March 21, 2018
Programming
0
74
Pod autoscaling with custom-metrics
How can you use your custom-metrics that are in your monitoring system to scale your pods.
Mattias Gees
March 21, 2018
Tweet
Share
More Decks by Mattias Gees
See All by Mattias Gees
A Cloud Native Journey At Scale (Belgium Kubernetes Meetup)
mattiasgees
0
37
Tarmak, why do we need another Kubernetes provisioner?
mattiasgees
1
260
Lightning Talk Prometheus
mattiasgees
0
65
Terraform workspaces
mattiasgees
0
100
Introduction to Ansible
mattiasgees
0
110
Other Decks in Programming
See All in Programming
はじめてのカスタムエージェント【GitHub Copilot Agent Mode編】
satoshi256kbyte
0
130
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.5k
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
260
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
130
SwiftUIで本格音ゲー実装してみた
hypebeans
0
550
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
860
ゆくKotlin くるRust
exoego
1
180
Developing static sites with Ruby
okuramasafumi
0
340
Python札幌 LT資料
t3tra
7
1.1k
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
4.1k
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
200
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.2k
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Skip the Path - Find Your Career Trail
mkilby
0
28
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
65
35k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
75
The World Runs on Bad Software
bkeepers
PRO
72
12k
The untapped power of vector embeddings
frankvandijk
1
1.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
880
Product Roadmaps are Hard
iamctodd
PRO
55
12k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Transcript
Pod autoscaling with custom-metrics
Mattias Gees • Cloud Engineer @skyscrapers • Avid runner •
Likes to experiment github.com/mattiasgees twitter.com/mattiasgees blog.mattiasgees.be
We are hiring! https://skyscrapers.eu/jobs
Who has used kubernetes?
API
Some history! • SIG Instrumentation • Tackled Heapster • Metrics-server
(beta 1.8) • Annotations (1.2 - 1.5) • Blogposts Q1 2017 are outdated! • Autoscaler (1.6 - ...)
Architecture
Requirements • API aggregation layer • Resource Metrics API •
Custom metrics API • kube-controller-manager • --horizontal-pod-autoscaler-use-rest-clients • --kubeconfig <path-to-kubeconfig> OR --master <ip- address-of-apiserver>
Enabled on 1.9
Basic check kubectl api-versions kubectl cluster-info
Architecture
Prometheus helm install coreos/prometheus-operator \ --name prometheus-operator \ --namespace monitoring
helm install coreos/kube-prometheus \ --name kube-prometheus \ --namespace monitoring \ -f prometheus.yaml
Application kubectl apply -f metrics-app.yaml
Prometheus-adapter • Create cert • Upload cert as secret kubectl
-n custom-metrics create secret tls cm- adapter-serving-certs --cert=server.crt -- key=server-key.pem • Deploy prometheus-adapter kubectl apply -f manifests
Test kubectl api-versions | grep custom custom.metrics.k8s.io/v1beta1
Test kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/" | jq
Test kubectl get --raw \ "/apis/custom.metrics.k8s.io/v1beta1/namespaces/default/ pods/*/http_requests" \ | jq
kubectl get --raw \ "/apis/custom.metrics.k8s.io/v1beta1/namespaces/default/ service/sample-metrics-app/http_requests" \ | jq
Deploy HPA kubectl apply -f hpa.yaml
Inspect kubectl describe hpa sample-metrics-app
Future • Still Alpha • Lots of discussions • Proposals
for extra features
Questions?