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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Mattias Gees
March 21, 2018
Programming
78
0
Share
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
More Decks by Mattias Gees
See All by Mattias Gees
A Cloud Native Journey At Scale (Belgium Kubernetes Meetup)
mattiasgees
0
42
Tarmak, why do we need another Kubernetes provisioner?
mattiasgees
1
270
Lightning Talk Prometheus
mattiasgees
0
67
Terraform workspaces
mattiasgees
0
110
Introduction to Ansible
mattiasgees
0
120
Other Decks in Programming
See All in Programming
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.5k
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
1k
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
130
JOAI2026 1st solution - heron0519 -
heron0519
0
150
Spec-driven Development: How AI Changes Everything (And Nothing)
simas
PRO
0
350
Back to the roots of date
jinroq
0
490
iOS機能開発のAI環境と起きた変化
ryunakayama
0
190
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
160
PHPer、Cloudflare に引っ越す
suguruooki
1
110
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
110
How Swift's Type System Guides AI Agents
koher
0
310
ハーネスエンジニアリングとは?
kinopeee
13
6.3k
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
160
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
360
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
130
GitHub's CSS Performance
jonrohan
1032
470k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
110
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
530
From π to Pie charts
rasagy
0
170
Designing for humans not robots
tammielis
254
26k
HDC tutorial
michielstock
2
640
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
4 Signs Your Business is Dying
shpigford
187
22k
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?