SlideShare a Scribd company logo
Auto-Scaling containers with
Nilesh Gule
@nileshgule | www.HandsOnArchitect.com
$whoami
{
“name” : “Nilesh Gule”,
“website” : “https://www.HandsOnArchitect.com",
“github” : “https://github.com/NileshGule"
“twitter” : “@nileshgule”,
“linkedin” : “https://www.linkedin.com/in/nileshgule”,
“email” : “nileshgule@gmail.com",
“likes” : “Technical Evangelism, Cricket”
}
Pros Cons
Scale k8s objects:
Kubectl scale –replicas=3 processor-deployment.yml
Kubectl scale –replicas=3 deployment/rabbitmq-consumer
Scale AKS cluster:
az aks scale --resource-group myResourceGroup 
--name myAKSCluster 
--node-count 5 
--nodepool-name <your node pool name>
Pros Cons
kubectl autoscale deployment php-apache 
--cpu-percent=50 
--min=1 
--max=10
Pros Cons
Pros Cons
Kubernetes-based Event Driven
Autoscaling
Azure Event Hub
Azure Service Bus Queues and Topics
Azure Storage Queues
Kafka
Prometheus
RabbitMQ
Redis Lists
Liiklus
NATS
AWS CloudWatch
AWS Simple Queue Service
GCP PubSub
Integrates with Azure functions
Demo Autoscaling Storage
Queue consumer with ACI
5000
messages
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: hello-keda
namespace: default
labels:
deploymentName: hello-keda
spec:
scaleTargetRef:
deploymentName: hello-keda
pollingInterval: 5 # Optional. Default: 30 seconds
maxReplicaCount: 15 # Optional. Default: 100
triggers:
- type: azure-queue
metadata:
name: myQueueItem
type: queueTrigger
direction: in
queueName: js-queue-items
connection: AzureWebJobsStorage
Demo Autoscaling RabbitMQ
https://github.com/NileshGule/AKS-learning-series
1000
messages
Batch of 10
messages
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: rabbitmq-consumer
namespace: default
labels:
deploymentName: rabbitmq-consumer
spec:
scaleTargetRef:
deploymentName: rabbitmq-consumer
pollingInterval: 5 # Optional. Default: 30 seconds
cooldownPeriod: 30 # Optional. Default: 300 seconds
minReplicaCount: 1 # Optional. Default: 0
maxReplicaCount: 30 # Optional. Default: 100
triggers:
- type: rabbitmq
metadata:
queueName: hello
host: 'amqp://user:PASSWORD@rabbitmq.default.svc.cluster.local:5672’
queueLength : '5'
AKS cluster-autoscalar
Virtual Node
Horizontal pod autoscale
virtual kubelet
KEDA
Azure Function with Queue
Thank you very much
Code with Passion and Strive for Excellence
https://github.com/NileshGule/AKS-learning-series
https://github.com/NileshGule/pd-tech-fest-2019
https://github.com/NileshGule/sample-dotnet-core-rabbitmq-keda
https://www.slideshare.net/nileshgule/presentations
https://speakerdeck.com/nileshgule/
Q&A

More Related Content

What's hot

What's hot (20)

Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Kubernetes - Security Journey
Kubernetes - Security JourneyKubernetes - Security Journey
Kubernetes - Security Journey
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Extending KEDA with External Scalers
Extending KEDA with External ScalersExtending KEDA with External Scalers
Extending KEDA with External Scalers
 
Kubernetes Security Best Practices - With tips for the CKS exam
Kubernetes Security Best Practices - With tips for the CKS examKubernetes Security Best Practices - With tips for the CKS exam
Kubernetes Security Best Practices - With tips for the CKS exam
 
Kubernetes Security
Kubernetes SecurityKubernetes Security
Kubernetes Security
 
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)
 
Amazon EKS를 위한 AWS CDK와 CDK8s 활용법 - 염지원, 김광영 AWS 솔루션즈 아키텍트 :: AWS Summit Seou...
Amazon EKS를 위한 AWS CDK와 CDK8s 활용법 - 염지원, 김광영 AWS 솔루션즈 아키텍트 :: AWS Summit Seou...Amazon EKS를 위한 AWS CDK와 CDK8s 활용법 - 염지원, 김광영 AWS 솔루션즈 아키텍트 :: AWS Summit Seou...
Amazon EKS를 위한 AWS CDK와 CDK8s 활용법 - 염지원, 김광영 AWS 솔루션즈 아키텍트 :: AWS Summit Seou...
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
 
Turning Virtual Machines Cloud-Native using KubeVirt
Turning Virtual Machines Cloud-Native using KubeVirtTurning Virtual Machines Cloud-Native using KubeVirt
Turning Virtual Machines Cloud-Native using KubeVirt
 
Extending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitionsExtending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitions
 
KubeVirt (Kubernetes and Cloud Native Toronto)
KubeVirt (Kubernetes and Cloud Native Toronto)KubeVirt (Kubernetes and Cloud Native Toronto)
KubeVirt (Kubernetes and Cloud Native Toronto)
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
Kubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & OperatorsKubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & Operators
 
Autoscaling in Kubernetes
Autoscaling in KubernetesAutoscaling in Kubernetes
Autoscaling in Kubernetes
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 

Similar to Scaling containers with keda

Similar to Scaling containers with keda (20)

Azure kubernetes service (aks) part 3
Azure kubernetes service (aks)   part 3Azure kubernetes service (aks)   part 3
Azure kubernetes service (aks) part 3
 
Serverless Event Driven Containers with KEDA
Serverless Event Driven Containers with KEDAServerless Event Driven Containers with KEDA
Serverless Event Driven Containers with KEDA
 
CI CD with Docker and Kubernetes
CI CD with Docker and Kubernetes CI CD with Docker and Kubernetes
CI CD with Docker and Kubernetes
 
Debug and Monitor Multi-container Apps on AKS
Debug and Monitor Multi-container Apps on AKSDebug and Monitor Multi-container Apps on AKS
Debug and Monitor Multi-container Apps on AKS
 
Azure kubernetes service (aks) part 4 - Deploy multi-container app to AKS c...
Azure kubernetes service (aks)   part 4 - Deploy multi-container app to AKS c...Azure kubernetes service (aks)   part 4 - Deploy multi-container app to AKS c...
Azure kubernetes service (aks) part 4 - Deploy multi-container app to AKS c...
 
Distributed Event Driven Systems with KEDA.pdf
Distributed Event Driven Systems with KEDA.pdfDistributed Event Driven Systems with KEDA.pdf
Distributed Event Driven Systems with KEDA.pdf
 
Azure containers fundamentals
Azure containers fundamentalsAzure containers fundamentals
Azure containers fundamentals
 
Autoscaling containers with event driven workloads
Autoscaling containers with event driven workloadsAutoscaling containers with event driven workloads
Autoscaling containers with event driven workloads
 
Scaling .net containers with event driven workloads
Scaling .net containers with event driven workloadsScaling .net containers with event driven workloads
Scaling .net containers with event driven workloads
 
Autoscale applications based on external events with KEDA.pdf
Autoscale applications based on external events with KEDA.pdfAutoscale applications based on external events with KEDA.pdf
Autoscale applications based on external events with KEDA.pdf
 
Big data for dot net Devs with Spark
Big data for dot net Devs with SparkBig data for dot net Devs with Spark
Big data for dot net Devs with Spark
 
Run Containerized Database SQL Server 2017 Linux
Run Containerized Database SQL Server 2017 LinuxRun Containerized Database SQL Server 2017 Linux
Run Containerized Database SQL Server 2017 Linux
 
Build Secure Portable Applications using AKS and its ecosystem
Build Secure Portable Applications using AKS and its ecosystemBuild Secure Portable Applications using AKS and its ecosystem
Build Secure Portable Applications using AKS and its ecosystem
 
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
 
Introduction to Kubernetes RBAC
Introduction to Kubernetes RBACIntroduction to Kubernetes RBAC
Introduction to Kubernetes RBAC
 
Resilient Microservices Architecture with kubernetes
Resilient Microservices Architecture with kubernetesResilient Microservices Architecture with kubernetes
Resilient Microservices Architecture with kubernetes
 
Auto Scaling Groups
Auto Scaling GroupsAuto Scaling Groups
Auto Scaling Groups
 
AKS components
AKS componentsAKS components
AKS components
 
Training TensorFlow Models at Scale with Kubernetes on Azure
Training TensorFlow Models at Scale with Kubernetes on AzureTraining TensorFlow Models at Scale with Kubernetes on Azure
Training TensorFlow Models at Scale with Kubernetes on Azure
 
Improve Monitoring and Observability for Kubernetes with OSS tools
Improve Monitoring and Observability for Kubernetes with OSS toolsImprove Monitoring and Observability for Kubernetes with OSS tools
Improve Monitoring and Observability for Kubernetes with OSS tools
 

More from Nilesh Gule

More from Nilesh Gule (20)

Code Creativity and Customers- Navigating the Generative AI Landscape.pdf
Code Creativity and Customers- Navigating the Generative AI Landscape.pdfCode Creativity and Customers- Navigating the Generative AI Landscape.pdf
Code Creativity and Customers- Navigating the Generative AI Landscape.pdf
 
Improve Monitoring And Observability for Kubernetes with OSS tools.pdf
Improve Monitoring And Observability for Kubernetes with OSS tools.pdfImprove Monitoring And Observability for Kubernetes with OSS tools.pdf
Improve Monitoring And Observability for Kubernetes with OSS tools.pdf
 
Modular Architecturs for Resilience and Adaptability.pdf
Modular Architecturs for Resilience and Adaptability.pdfModular Architecturs for Resilience and Adaptability.pdf
Modular Architecturs for Resilience and Adaptability.pdf
 
Singapore JUG - Open Telemetry.pdf
Singapore JUG - Open Telemetry.pdfSingapore JUG - Open Telemetry.pdf
Singapore JUG - Open Telemetry.pdf
 
Cloud Native Ninja - Getting Started with Kubernetes - Part 9.pdf
Cloud Native Ninja - Getting Started with Kubernetes - Part 9.pdfCloud Native Ninja - Getting Started with Kubernetes - Part 9.pdf
Cloud Native Ninja - Getting Started with Kubernetes - Part 9.pdf
 
Cloud Native Ninja - PT8 - Containerize React app.pdf
Cloud Native Ninja - PT8 - Containerize React app.pdfCloud Native Ninja - PT8 - Containerize React app.pdf
Cloud Native Ninja - PT8 - Containerize React app.pdf
 
Cloud Native Ninja - PT8 - Containerize React app.pdf
Cloud Native Ninja - PT8 - Containerize React app.pdfCloud Native Ninja - PT8 - Containerize React app.pdf
Cloud Native Ninja - PT8 - Containerize React app.pdf
 
Modular Architecturs for resilience and Adaptability.pdf
Modular Architecturs for resilience and Adaptability.pdfModular Architecturs for resilience and Adaptability.pdf
Modular Architecturs for resilience and Adaptability.pdf
 
Modular Architecturs for resilience and Adaptability.pdf
Modular Architecturs for resilience and Adaptability.pdfModular Architecturs for resilience and Adaptability.pdf
Modular Architecturs for resilience and Adaptability.pdf
 
Cloud Native Ninja - PT7 - Containerize Go apps.pdf
Cloud Native Ninja - PT7 - Containerize Go apps.pdfCloud Native Ninja - PT7 - Containerize Go apps.pdf
Cloud Native Ninja - PT7 - Containerize Go apps.pdf
 
Cloud Native Ninja - PT6 - Containerize Spring Boot apps.pdf
Cloud Native Ninja - PT6 - Containerize Spring Boot apps.pdfCloud Native Ninja - PT6 - Containerize Spring Boot apps.pdf
Cloud Native Ninja - PT6 - Containerize Spring Boot apps.pdf
 
Cloud Native Ninja - PT5 - Publish container images.pdf
Cloud Native Ninja - PT5 - Publish container images.pdfCloud Native Ninja - PT5 - Publish container images.pdf
Cloud Native Ninja - PT5 - Publish container images.pdf
 
Portable Multi-cloud Microservices with Dapr .pdf
Portable Multi-cloud Microservices with Dapr .pdfPortable Multi-cloud Microservices with Dapr .pdf
Portable Multi-cloud Microservices with Dapr .pdf
 
Portable Multi-cloud Microservices with Dapr .pdf
Portable Multi-cloud Microservices with Dapr .pdfPortable Multi-cloud Microservices with Dapr .pdf
Portable Multi-cloud Microservices with Dapr .pdf
 
Manage Multi Container Apps with Docker Compose.pdf
Manage Multi Container Apps with Docker Compose.pdfManage Multi Container Apps with Docker Compose.pdf
Manage Multi Container Apps with Docker Compose.pdf
 
Portable Multi-cloud Microservices with Dapr .pptx
Portable Multi-cloud Microservices with Dapr .pptxPortable Multi-cloud Microservices with Dapr .pptx
Portable Multi-cloud Microservices with Dapr .pptx
 
Cloud Native Ninja - PT3 - Containerize DOTNET apps.pdf
Cloud Native Ninja - PT3 - Containerize DOTNET apps.pdfCloud Native Ninja - PT3 - Containerize DOTNET apps.pdf
Cloud Native Ninja - PT3 - Containerize DOTNET apps.pdf
 
Cloud Native Ninja - Distributed Microservices with Dapr - part 2.pdf
Cloud Native Ninja - Distributed Microservices with Dapr - part 2.pdfCloud Native Ninja - Distributed Microservices with Dapr - part 2.pdf
Cloud Native Ninja - Distributed Microservices with Dapr - part 2.pdf
 
Cloud Native Ninja - Getting Started with Containers - Part 1.pdf
Cloud Native Ninja - Getting Started with Containers - Part 1.pdfCloud Native Ninja - Getting Started with Containers - Part 1.pdf
Cloud Native Ninja - Getting Started with Containers - Part 1.pdf
 
15-factor-apps.pdf
15-factor-apps.pdf15-factor-apps.pdf
15-factor-apps.pdf
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 

Scaling containers with keda