SlideShare a Scribd company logo
1 of 10
Download to read offline
Creating Kubernetes
Autoscalers
github.com/jthomperoo
Jamie Thompson
Who am I?
● Final year Computer Science student at
Queen’s University Belfast.
● Previously worked at IBM for a year.
● Open sourced projects for QRadar.
● Constantly working on side projects, most of
them open source.
Why open source?
● To have a greater chance that someone
will find it and use it.
● To get more responsive feedback per
release.
● Community led feature suggestion, bug
reporting, and use case explanation.
● Kubernetes ecosystem is open source
oriented.
Kubernetes and autoscaling
● Kubernetes allows sharing resources
between applications.
● Built on container technology, such as Docker,
standardising applications into units with
infinite scalability potential.
● Autoscaling is the act of balancing which
applications need more or less resources
based on criteria and metrics.
● Horizontal Pod Autoscaler inbuilt method for
autoscaling, generally used to scale on
CPU/Memory.
The Problem
● The Horizontal Pod Autoscaler has a
hard-coded equation for calculating how to
scale.
● Custom metrics go some way to help with
this, but ultimately still constrained by core
equation.
● If more complex scaling logic required (e.g.
conditional logic, queues), a custom
autoscaler is required.
● Custom autoscalers are difficult and time
consuming to create, requiring knowledge of
the Kubernetes API and Kubernetes lifecycle.
The Goal
● Make autoscalers quick and easy to make,
with limited Kubernetes knowledge required.
● Abstract away complicated Kubernetes API
interactions.
● Autoscaler logic writeable in any language,
framework or environment, and should be
simple enough to be contained in a single
script.
Custom Pod Autoscaler Framework
● Works by integrating user provided logic, written in any language or
framework, with a program to abstract away Kubernetes interactions.
● Allows quick and easy autoscaler development.
● Fast prototyping and experimentation.
● Any logic that can be started with a shell command can be used.
● Runs in the Kubernetes cluster as a pod.
● Fully configurable, supports everything the Horizontal Pod Autoscaler
can be configured with.
● Allows configuration without master node access, allowing use on
managed providers such as EKS or GKE.
Custom Pod Autoscaler Framework
Predictive Horizontal Pod Autoscaler
● Allows use of statistical models
coupled with standard autoscaling
metrics.
● Can predict future demand based on
historical data - preemptively scaling
rather than reacting to demand.
● Can see reductions in latency spikes
if configured and tuned correctly.
Any questions?
Some (maybe) useful links
jamiethompson.me
github.com/jthomperoo/custom-pod-autoscaler
github.com/jthomperoo/predictive-horizontal-pod-autoscaler

More Related Content

What's hot

Tensorflow London 13: Barbara Fusinska 'Hassle Free, Scalable, Machine Learni...
Tensorflow London 13: Barbara Fusinska 'Hassle Free, Scalable, Machine Learni...Tensorflow London 13: Barbara Fusinska 'Hassle Free, Scalable, Machine Learni...
Tensorflow London 13: Barbara Fusinska 'Hassle Free, Scalable, Machine Learni...
Seldon
 
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward
 

What's hot (19)

.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ....NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
 
Adopting software design practices for better machine learning
Adopting software design practices for better machine learningAdopting software design practices for better machine learning
Adopting software design practices for better machine learning
 
How To Build Auto-Adaptive Machine Learning Models with Kubernetes
How To Build Auto-Adaptive Machine Learning Models with KubernetesHow To Build Auto-Adaptive Machine Learning Models with Kubernetes
How To Build Auto-Adaptive Machine Learning Models with Kubernetes
 
DevTernity - OOP in the enterprise
DevTernity - OOP in the enterpriseDevTernity - OOP in the enterprise
DevTernity - OOP in the enterprise
 
Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
Project Frankenstein: A multitenant, horizontally scalable Prometheus as a se...
 
Tensorflow London 13: Barbara Fusinska 'Hassle Free, Scalable, Machine Learni...
Tensorflow London 13: Barbara Fusinska 'Hassle Free, Scalable, Machine Learni...Tensorflow London 13: Barbara Fusinska 'Hassle Free, Scalable, Machine Learni...
Tensorflow London 13: Barbara Fusinska 'Hassle Free, Scalable, Machine Learni...
 
Ray distributed python framework
Ray distributed python framework Ray distributed python framework
Ray distributed python framework
 
Knative, Serverless on Kubernetes, and Openshift
Knative, Serverless on Kubernetes, and OpenshiftKnative, Serverless on Kubernetes, and Openshift
Knative, Serverless on Kubernetes, and Openshift
 
The log
The logThe log
The log
 
TechTalk Webinar Series - Getting Started with Apache OpenWhisk
TechTalk Webinar Series - Getting Started with Apache OpenWhiskTechTalk Webinar Series - Getting Started with Apache OpenWhisk
TechTalk Webinar Series - Getting Started with Apache OpenWhisk
 
Go lambda-presentation
Go lambda-presentationGo lambda-presentation
Go lambda-presentation
 
Tooling Matters - Development tools
Tooling Matters - Development toolsTooling Matters - Development tools
Tooling Matters - Development tools
 
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
Flink Forward San Francisco 2019: Managing Flink on Kubernetes - FlinkK8sOper...
 
Knative serving
Knative servingKnative serving
Knative serving
 
Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)
 
Collaborative data science and how to build a data science toolchain around n...
Collaborative data science and how to build a data science toolchain around n...Collaborative data science and how to build a data science toolchain around n...
Collaborative data science and how to build a data science toolchain around n...
 
Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...
Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...
Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...
 
Machine learning in survey monkey
Machine learning in survey monkeyMachine learning in survey monkey
Machine learning in survey monkey
 
Facilitez votre transition DevOps grâce à l'automatisation de votre infras...
 Facilitez votre transition DevOps grâce à l'automatisation de votre infras... Facilitez votre transition DevOps grâce à l'automatisation de votre infras...
Facilitez votre transition DevOps grâce à l'automatisation de votre infras...
 

Similar to Creating Kubernetes Autoscalers

Similar to Creating Kubernetes Autoscalers (20)

Kubernetes intro
Kubernetes introKubernetes intro
Kubernetes intro
 
Kubernetes basics, Nodes, Pods, Containers, Deployments
Kubernetes basics, Nodes, Pods, Containers, DeploymentsKubernetes basics, Nodes, Pods, Containers, Deployments
Kubernetes basics, Nodes, Pods, Containers, Deployments
 
Migrating from oracle soa suite to microservices on kubernetes
Migrating from oracle soa suite to microservices on kubernetesMigrating from oracle soa suite to microservices on kubernetes
Migrating from oracle soa suite to microservices on kubernetes
 
The Kubernetes Effect
The Kubernetes EffectThe Kubernetes Effect
The Kubernetes Effect
 
Where should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and moreWhere should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and more
 
Mcroservices with docker kubernetes, goang and grpc, overview
Mcroservices with docker kubernetes, goang and grpc, overviewMcroservices with docker kubernetes, goang and grpc, overview
Mcroservices with docker kubernetes, goang and grpc, overview
 
Journey Through Four Stages of Kubernetes Deployment Maturity
Journey Through Four Stages of Kubernetes Deployment MaturityJourney Through Four Stages of Kubernetes Deployment Maturity
Journey Through Four Stages of Kubernetes Deployment Maturity
 
GCCP JSCOE Session 2
GCCP JSCOE Session 2GCCP JSCOE Session 2
GCCP JSCOE Session 2
 
Washington DC MuleSoft Meetup 05-12-22-2.pptx
Washington DC MuleSoft Meetup 05-12-22-2.pptxWashington DC MuleSoft Meetup 05-12-22-2.pptx
Washington DC MuleSoft Meetup 05-12-22-2.pptx
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021
 
SpringOne Tour: An Introduction to Azure Spring Apps Enterprise
SpringOne Tour: An Introduction to Azure Spring Apps EnterpriseSpringOne Tour: An Introduction to Azure Spring Apps Enterprise
SpringOne Tour: An Introduction to Azure Spring Apps Enterprise
 
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and KnativeBuild and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
 
Container Landscape in 2019
Container Landscape in 2019Container Landscape in 2019
Container Landscape in 2019
 
CI/CD on Google Cloud Platform
CI/CD on Google Cloud PlatformCI/CD on Google Cloud Platform
CI/CD on Google Cloud Platform
 
Kubernetes and bluemix
Kubernetes  and  bluemixKubernetes  and  bluemix
Kubernetes and bluemix
 
01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx01. Kubernetes-PPT.pptx
01. Kubernetes-PPT.pptx
 
Democratizing machine learning on kubernetes
Democratizing machine learning on kubernetesDemocratizing machine learning on kubernetes
Democratizing machine learning on kubernetes
 
Intro to Kubernetes
Intro to KubernetesIntro to Kubernetes
Intro to Kubernetes
 
DockerCon SF 2015 : Reliably shipping containers in a resource rich world usi...
DockerCon SF 2015 : Reliably shipping containers in a resource rich world usi...DockerCon SF 2015 : Reliably shipping containers in a resource rich world usi...
DockerCon SF 2015 : Reliably shipping containers in a resource rich world usi...
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 

Creating Kubernetes Autoscalers

  • 2. Who am I? ● Final year Computer Science student at Queen’s University Belfast. ● Previously worked at IBM for a year. ● Open sourced projects for QRadar. ● Constantly working on side projects, most of them open source.
  • 3. Why open source? ● To have a greater chance that someone will find it and use it. ● To get more responsive feedback per release. ● Community led feature suggestion, bug reporting, and use case explanation. ● Kubernetes ecosystem is open source oriented.
  • 4. Kubernetes and autoscaling ● Kubernetes allows sharing resources between applications. ● Built on container technology, such as Docker, standardising applications into units with infinite scalability potential. ● Autoscaling is the act of balancing which applications need more or less resources based on criteria and metrics. ● Horizontal Pod Autoscaler inbuilt method for autoscaling, generally used to scale on CPU/Memory.
  • 5. The Problem ● The Horizontal Pod Autoscaler has a hard-coded equation for calculating how to scale. ● Custom metrics go some way to help with this, but ultimately still constrained by core equation. ● If more complex scaling logic required (e.g. conditional logic, queues), a custom autoscaler is required. ● Custom autoscalers are difficult and time consuming to create, requiring knowledge of the Kubernetes API and Kubernetes lifecycle.
  • 6. The Goal ● Make autoscalers quick and easy to make, with limited Kubernetes knowledge required. ● Abstract away complicated Kubernetes API interactions. ● Autoscaler logic writeable in any language, framework or environment, and should be simple enough to be contained in a single script.
  • 7. Custom Pod Autoscaler Framework ● Works by integrating user provided logic, written in any language or framework, with a program to abstract away Kubernetes interactions. ● Allows quick and easy autoscaler development. ● Fast prototyping and experimentation. ● Any logic that can be started with a shell command can be used. ● Runs in the Kubernetes cluster as a pod. ● Fully configurable, supports everything the Horizontal Pod Autoscaler can be configured with. ● Allows configuration without master node access, allowing use on managed providers such as EKS or GKE.
  • 9. Predictive Horizontal Pod Autoscaler ● Allows use of statistical models coupled with standard autoscaling metrics. ● Can predict future demand based on historical data - preemptively scaling rather than reacting to demand. ● Can see reductions in latency spikes if configured and tuned correctly.
  • 10. Any questions? Some (maybe) useful links jamiethompson.me github.com/jthomperoo/custom-pod-autoscaler github.com/jthomperoo/predictive-horizontal-pod-autoscaler