{"id":31639,"date":"2026-06-30T13:40:18","date_gmt":"2026-06-30T08:10:18","guid":{"rendered":"https:\/\/opstree.com\/blog\/?p=31639"},"modified":"2026-06-30T13:44:46","modified_gmt":"2026-06-30T08:14:46","slug":"keda-kubernetes-autoscaling","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/keda-kubernetes-autoscaling\/","title":{"rendered":"Kubernetes Event-Driven Autoscaling with KEDA: Deployment and Best Practices"},"content":{"rendered":"<h2 aria-level=\"3\"><b><span data-contrast=\"none\">Introduction<\/span><\/b><\/h2>\n<p><span data-contrast=\"auto\">For DevOps engineers, the standard\u00a0<\/span><b><span data-contrast=\"auto\">Horizontal Pod\u00a0Autoscaler\u00a0(HPA)<\/span><\/b><span data-contrast=\"auto\"> is a reliable workhorse for scaling based on CPU and memory. However, in modern event-driven architectures, like the workflow automation tasks you might build with <\/span><b><span data-contrast=\"auto\">n8n<\/span><\/b><span data-contrast=\"auto\">\u00a0or messaging systems like\u00a0<\/span><b><span data-contrast=\"auto\"><a href=\"https:\/\/opstree.com\/blog\/kafka-flask-real-time-streaming\/\" target=\"_blank\" rel=\"noopener\">Kafka<\/a>, <\/span><\/b><span data-contrast=\"auto\">resource metrics are often a lagging indicator.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">If your message queue has 10,000 pending tasks, your pods might still show low CPU usage while idling. You need a way to scale\u00a0<\/span><i><span data-contrast=\"auto\">proactively<\/span><\/i><span data-contrast=\"auto\"> based on the work waiting to be done. This is <\/span><span data-contrast=\"auto\">where <\/span><b><span data-contrast=\"auto\">KEDA<\/span><\/b><span data-contrast=\"auto\">\u00a0shines.<\/span><\/p>\n<h2 aria-level=\"3\"><b><span data-contrast=\"none\">What is KEDA?<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:142,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">KEDA is a single-purpose, lightweight\u00a0component\u00a0that provides event-driven autoscaling for any <a href=\"https:\/\/opstree.com\/blog\/kubernetes-cri-container-runtime-interface\/\" target=\"_blank\" rel=\"noopener\">Kubernetes container<\/a>. It was originally created by Microsoft and Red Hat and is now a CNCF graduated project.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h2><span class=\"TextRun SCXW122783539 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW122783539 BCX0\" data-ccp-parastyle=\"heading 4\">Key Components<\/span><\/span><span class=\"EOP Selected SCXW122783539 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:119,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31642 size-full\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/06\/image-50.png\" alt=\"KEDA\" width=\"1016\" height=\"625\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/06\/image-50.png 1016w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/06\/image-50-300x185.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/06\/image-50-768x472.png 768w\" sizes=\"auto, (max-width: 1016px) 100vw, 1016px\" \/><\/p>\n<h3><span class=\"TextRun SCXW215622612 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW215622612 BCX0\" data-ccp-parastyle=\"heading 2\">1. KEDA Operator<\/span><\/span><span class=\"EOP Selected SCXW215622612 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:198,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h3>\n<p><span class=\"TextRun SCXW232449852 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW232449852 BCX0\">The KEDA Operator is the core\u00a0<\/span><span class=\"NormalTextRun SCXW232449852 BCX0\">component<\/span><span class=\"NormalTextRun SCXW232449852 BCX0\">\u00a0that manages the lifecycle of KEDA resources within a Kubernetes cluster. It\u00a0<\/span><span class=\"NormalTextRun SCXW232449852 BCX0\">is responsible for<\/span><span class=\"NormalTextRun SCXW232449852 BCX0\">:<\/span><\/span><span class=\"EOP Selected SCXW232449852 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><strong><span class=\"TextRun SCXW207258818 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW207258818 BCX0\">Monitoring Scalers<\/span><\/span><\/strong><span class=\"TextRun SCXW207258818 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW207258818 BCX0\"><strong>:<\/strong> The Operator continuously\u00a0<\/span><\/span> <span class=\"TextRun SCXW207258818 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW207258818 BCX0\">monitors<\/span><span class=\"NormalTextRun SCXW207258818 BCX0\">\u00a0the defined Scalers to\u00a0<\/span><span class=\"NormalTextRun SCXW207258818 BCX0\">determine<\/span><span class=\"NormalTextRun SCXW207258818 BCX0\"> when to scale the <\/span><\/span><span class=\"TextRun SCXW207258818 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW207258818 BCX0\">associated workloads<\/span><\/span><\/li>\n<li><strong><span class=\"TextRun SCXW80846021 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW80846021 BCX0\">Managing Custom Resources<\/span><\/span><\/strong><span class=\"TextRun SCXW80846021 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW80846021 BCX0\"><strong>:<\/strong> It handles the creation,\u00a0<\/span><\/span> <span class=\"TextRun SCXW80846021 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW80846021 BCX0\">update, and deletion of KEDA-specific resources, ensuring that the\u00a0<\/span><\/span> <span class=\"TextRun SCXW80846021 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW80846021 BCX0\">desired state of the application is\u00a0<\/span><span class=\"NormalTextRun SCXW80846021 BCX0\">maintained<\/span><span class=\"NormalTextRun SCXW80846021 BCX0\">.<\/span><\/span><span class=\"EOP Selected SCXW80846021 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><strong><span class=\"TextRun SCXW265666255 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW265666255 BCX0\">Integration with Kubernetes <\/span><\/span><\/strong><span class=\"TextRun SCXW265666255 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW265666255 BCX0\"><strong>:<\/strong> The Operator interacts <\/span><\/span><span class=\"TextRun SCXW265666255 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW265666255 BCX0\">with the <a href=\"https:\/\/opstree.com\/blog\/what-is-kubernetes-api\/\" target=\"_blank\" rel=\"noopener\">Kubernetes API<\/a> to\u00a0<\/span><span class=\"NormalTextRun SCXW265666255 BCX0\">facilitate<\/span><span class=\"NormalTextRun SCXW265666255 BCX0\">\u00a0scaling actions based on the\u00a0<\/span><\/span> <span class=\"TextRun SCXW265666255 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW265666255 BCX0\">metrics provided by the Scalers<\/span><\/span><span class=\"EOP Selected SCXW265666255 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<h3><span class=\"TextRun SCXW10778043 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW10778043 BCX0\" data-ccp-parastyle=\"heading 2\">2. Scalers<\/span><\/span><\/h3>\n<p><span class=\"TextRun SCXW252827880 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW252827880 BCX0\">Scalers are the building blocks of KEDA that define how to scale applications based on specific metrics or events. They can be categorized into two main types:<\/span><\/span><span class=\"EOP Selected SCXW252827880 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><strong><span class=\"TextRun SCXW267135649 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW267135649 BCX0\">Built-in Scalers<\/span><\/span><\/strong><span class=\"TextRun SCXW267135649 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW267135649 BCX0\"><strong>:<\/strong> KEDA comes with a variety of\u00a0<\/span><\/span> <span class=\"TextRun SCXW267135649 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW267135649 BCX0\">built-in Scalers that support common event sources, such as:<\/span><\/span><span class=\"EOP Selected SCXW267135649 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><b><span data-contrast=\"auto\">Message Queues<\/span><\/b><span data-contrast=\"auto\">: Scale based on the number of\u00a0<\/span> <span data-contrast=\"auto\">messages in queues like RabbitMQ, Kafka, or Azure Service Bus.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><strong><span class=\"TextRun SCXW111494030 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW111494030 BCX0\">HTTP Requests<\/span><\/span><\/strong><span class=\"TextRun SCXW111494030 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW111494030 BCX0\"><strong>:<\/strong> Scale based on incoming HTTP\u00a0<\/span><\/span> <span class=\"TextRun SCXW111494030 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW111494030 BCX0\">requests.<\/span><\/span><span class=\"EOP Selected SCXW111494030 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><strong><span class=\"TextRun SCXW67220447 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW67220447 BCX0\">Database Metrics<\/span><\/span><\/strong><span class=\"TextRun SCXW67220447 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW67220447 BCX0\"><strong>:<\/strong> Scale based on database load or <\/span><\/span><span class=\"TextRun SCXW67220447 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW67220447 BCX0\">query metrics.<\/span><\/span><span class=\"EOP Selected SCXW67220447 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><strong><span class=\"TextRun SCXW54588847 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW54588847 BCX0\">External Scalers<\/span><\/span><\/strong><span class=\"TextRun SCXW54588847 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW54588847 BCX0\"><strong>:<\/strong> Users can also create custom <\/span><\/span><span class=\"TextRun SCXW54588847 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW54588847 BCX0\">external Scalers to integrate with other event sources or metrics <\/span><\/span><span class=\"TextRun SCXW54588847 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW54588847 BCX0\">that are not covered by built-in options. This flexibility allows\u00a0<\/span><\/span> <span class=\"TextRun SCXW54588847 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW54588847 BCX0\">KEDA to be tailored to specific application needs.<\/span><\/span><span class=\"EOP Selected SCXW54588847 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h3><span class=\"TextRun SCXW56190273 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW56190273 BCX0\" data-ccp-parastyle=\"heading 2\">3. Custom Resource Definitions (CRDs)<\/span><\/span><span class=\"EOP Selected SCXW56190273 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:198,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h3>\n<p><span class=\"TextRun SCXW233857531 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW233857531 BCX0\">KEDA introduces several Custom Resource Definitions (CRDs) that extend Kubernetes&#8217; capabilities. The primary CRDs include:<\/span><\/span><span class=\"EOP Selected SCXW233857531 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><strong><span class=\"TextRun SCXW256070513 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2Themed SCXW256070513 BCX0\">ScaledObject<\/span><\/span><\/strong><span class=\"TextRun SCXW256070513 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW256070513 BCX0\"><strong>:<\/strong> This CRD defines the scaling\u00a0<\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW256070513 BCX0\">behavior <\/span><\/span><span class=\"TextRun SCXW256070513 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW256070513 BCX0\">for a specific deployment. It specifies:<\/span><\/span><span class=\"EOP Selected SCXW256070513 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><span class=\"TextRun SCXW147436560 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW147436560 BCX0\">The target deployment to scale.<\/span><\/span><span class=\"EOP Selected SCXW147436560 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span class=\"TextRun SCXW77641629 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW77641629 BCX0\">The Scaler(s) to use for\u00a0<\/span><span class=\"NormalTextRun SCXW77641629 BCX0\">determining<\/span><span class=\"NormalTextRun SCXW77641629 BCX0\">\u00a0the scaling metrics.<\/span><\/span><span class=\"EOP Selected SCXW77641629 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span class=\"TextRun SCXW70598090 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW70598090 BCX0\">The minimum and\u00a0<\/span><span class=\"NormalTextRun SCXW70598090 BCX0\">maximum<\/span><span class=\"NormalTextRun SCXW70598090 BCX0\">\u00a0replicas for the deployment.<\/span><\/span><span class=\"EOP Selected SCXW70598090 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><strong><span class=\"TextRun SCXW33558089 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2Themed SCXW33558089 BCX0\">Trigger Authentication<\/span><\/span><\/strong><span class=\"TextRun SCXW33558089 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW33558089 BCX0\"><strong>:<\/strong> This CRD is used to manage <\/span><\/span><span class=\"TextRun SCXW33558089 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW33558089 BCX0\">authentication details for external services that the Scalers may <\/span><\/span><span class=\"TextRun SCXW33558089 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW33558089 BCX0\">need to access. It allows users to securely store credentials and <\/span><\/span><span class=\"TextRun SCXW33558089 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW33558089 BCX0\">tokens <\/span><\/span><span class=\"TextRun SCXW33558089 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW33558089 BCX0\">required<\/span><span class=\"NormalTextRun SCXW33558089 BCX0\">\u00a0for scaling operations.<\/span><\/span><span class=\"EOP Selected SCXW33558089 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h3><span class=\"TextRun SCXW15963339 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW15963339 BCX0\" data-ccp-parastyle=\"heading 2\">4. Metrics Server<\/span><\/span><span class=\"EOP Selected SCXW15963339 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:198,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h3>\n<p><span class=\"TextRun SCXW77158834 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW77158834 BCX0\">While KEDA does not include its own metrics server, it relies on existing Kubernetes metrics servers to gather data. The metrics server provides the necessary metrics that KEDA uses to make scaling decisions. KEDA can work with various metrics sources, including:<\/span><\/span><span class=\"EOP Selected SCXW77158834 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><strong><span class=\"TextRun SCXW234176113 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW234176113 BCX0\">Kubernetes Metrics API<\/span><\/span><\/strong><span class=\"TextRun SCXW234176113 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW234176113 BCX0\"><strong>:<\/strong> For standard metrics like <\/span><\/span><span class=\"TextRun SCXW234176113 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW234176113 BCX0\">CPU and memory usage.<\/span><\/span><span class=\"EOP Selected SCXW234176113 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><strong><span class=\"TextRun SCXW168803811 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW168803811 BCX0\">External Metrics<\/span><\/span><\/strong><span class=\"TextRun SCXW168803811 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW168803811 BCX0\"><strong>:<\/strong> For metrics provided by external <\/span><\/span><span class=\"TextRun SCXW168803811 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW168803811 BCX0\">systems or custom metrics defined by users.<\/span><\/span><span class=\"EOP Selected SCXW168803811 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<h3><span class=\"TextRun SCXW234060502 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW234060502 BCX0\" data-ccp-parastyle=\"heading 2\">5. Event Sources<\/span><\/span><span class=\"EOP Selected SCXW234060502 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:198,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h3>\n<p><span class=\"TextRun SCXW4657456 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW4657456 BCX0\">KEDA supports a wide range of event sources that can trigger scaling actions. These event sources can be integrated with various cloud services and messaging systems, enabling applications to respond to real-time events. Some common event sources include:<\/span><\/span><span class=\"EOP Selected SCXW4657456 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><strong><span class=\"TextRun SCXW124066848 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW124066848 BCX0\">Cloud Pub\/Sub Services<\/span><\/span><\/strong><span class=\"TextRun SCXW124066848 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW124066848 BCX0\"><strong>:<\/strong> Such as Google Cloud <\/span><\/span><span class=\"TextRun SCXW124066848 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW124066848 BCX0\">Pub\/Sub or AWS SNS\/SQS.<\/span><\/span><span class=\"EOP Selected SCXW124066848 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><strong><span class=\"TextRun SCXW55313592 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW55313592 BCX0\">Database Change Streams<\/span><\/span><\/strong><span class=\"TextRun SCXW55313592 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW55313592 BCX0\"><strong>:<\/strong> For scaling based on <\/span><\/span><span class=\"TextRun SCXW55313592 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW55313592 BCX0\">changes in databases like <a href=\"https:\/\/opstree.com\/blog\/mongodb-setup-on-kubernetes-using-mongodb-operator\/\" target=\"_blank\" rel=\"noopener\">MongoDB<\/a> or <a href=\"https:\/\/opstree.com\/blog\/postgresql-performance-with-pgbouncer\/\" target=\"_blank\" rel=\"noopener\">PostgreSQL<\/a>.<\/span><\/span><span class=\"EOP Selected SCXW55313592 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><strong><span class=\"TextRun SCXW28654037 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW28654037 BCX0\">Custom Webhooks<\/span><\/span><\/strong><span class=\"TextRun SCXW28654037 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW28654037 BCX0\"><strong>:<\/strong> For integrating with proprietary <\/span><\/span><span class=\"TextRun SCXW28654037 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW28654037 BCX0\">systems or services.<\/span><\/span><span class=\"EOP Selected SCXW28654037 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<h3><span class=\"TextRun SCXW172363293 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW172363293 BCX0\" data-ccp-parastyle=\"heading 2\">6. Kubernetes Deployments<\/span><\/span><span class=\"EOP Selected SCXW172363293 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:198,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h3>\n<p><span class=\"TextRun SCXW193287652 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW193287652 BCX0\">KEDA works in conjunction with standard Kubernetes deployments. The scaling actions performed by KEDA directly affect the number of replicas in a <a href=\"https:\/\/opstree.com\/blog\/simplify-your-kubernetes-deployments-with-argocd-and-gitops\/\" target=\"_blank\" rel=\"noopener\">Kubernetes deployment<\/a>. This integration ensures that applications can scale seamlessly based on the defined metrics and events.<\/span><\/span><span class=\"EOP Selected SCXW193287652 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h3><span class=\"TextRun SCXW248159509 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW248159509 BCX0\" data-ccp-parastyle=\"heading 2\">7. Dashboard and Monitoring Tools<\/span><\/span><span class=\"EOP Selected SCXW248159509 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:198,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h3>\n<p><span class=\"TextRun SCXW250177176 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW250177176 BCX0\">While KEDA does not come with a built-in dashboard, it can be integrated with various monitoring and visualization tools to provide insights into scaling activities. Popular tools include:<\/span><\/span><span class=\"EOP Selected SCXW250177176 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><strong><span class=\"TextRun SCXW174243326 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW174243326 BCX0\">Prometheus<\/span><\/span><\/strong><span class=\"TextRun SCXW174243326 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW174243326 BCX0\"><strong>:<\/strong> For collecting and querying metrics.<\/span><\/span><span class=\"EOP Selected SCXW174243326 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><strong><span class=\"TextRun SCXW209559348 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW209559348 BCX0\">Grafana<\/span><\/span><\/strong><span class=\"TextRun SCXW209559348 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW209559348 BCX0\"><strong>:<\/strong> For visualizing metrics and scaling <\/span><\/span><span class=\"TextRun SCXW209559348 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SpellingErrorV2Themed SCXW209559348 BCX0\">behavior<\/span><span class=\"NormalTextRun SCXW209559348 BCX0\">.<\/span><\/span><span class=\"EOP Selected SCXW209559348 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><strong><span class=\"TextRun SCXW219513046 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW219513046 BCX0\">Kubernetes Dashboard<\/span><\/span><\/strong><span class=\"TextRun SCXW219513046 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW219513046 BCX0\"><strong>:<\/strong> For monitoring the overall <\/span><\/span><span class=\"TextRun SCXW219513046 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW219513046 BCX0\">health and performance of Kubernetes resources.<\/span><\/span><span class=\"EOP SCXW219513046 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<div style=\"border: 1px solid #d1d5db; padding: 16px; margin: 20px 0; background-color: #f0f4f8;\">\n<p style=\"margin: 0; font-weight: 600; font-size: 16px;\">Enterprise Kubernetes Migration Success: 150+ Microservices, Zero Downtime and 60% Faster Deployments &#8211; <a href=\"https:\/\/opstree.com\/case-study\/hassle-free-microservices-migration-to-bare-metal-kubernetes-environment-for-a-reputed-indian-bank\/\" target=\"_blank\" rel=\"noopener\">Full Case Study<\/a><\/p>\n<\/div>\n<h2><span class=\"TextRun SCXW229300838 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW229300838 BCX0\" data-ccp-parastyle=\"heading 3\">The Killer Feature: Scaling to Zero<\/span><\/span><span class=\"EOP Selected SCXW229300838 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:142,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h2>\n<p><span class=\"TextRun SCXW146343277 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW146343277 BCX0\">Perhaps the<\/span><span class=\"NormalTextRun SCXW146343277 BCX0\">\u00a0most significant advantage of KEDA is its ability to scale a workload down to\u00a0<\/span><\/span><span class=\"TextRun SCXW146343277 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW146343277 BCX0\">zero replicas<\/span><\/span><span class=\"TextRun SCXW146343277 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW146343277 BCX0\">\u00a0when no events are present.<\/span><\/span><span class=\"EOP Selected SCXW146343277 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><strong><span class=\"TextRun SCXW45224322 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW45224322 BCX0\">Standard HPA: <\/span><\/span><\/strong><span class=\"TextRun SCXW45224322 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW45224322 BCX0\">Typically cannot scale below one replica.<\/span><\/span><span class=\"EOP Selected SCXW45224322 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><strong><span class=\"TextRun SCXW78342730 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW78342730 BCX0\">KEDA:<\/span><\/span><\/strong><span class=\"TextRun SCXW78342730 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW78342730 BCX0\"><strong>\u00a0<\/strong>Monitors\u00a0<\/span><\/span> <span class=\"TextRun SCXW78342730 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW78342730 BCX0\">the event source. When it detects a new event, it wakes up <\/span><\/span><span class=\"TextRun SCXW78342730 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW78342730 BCX0\">the deployment, scaling it to one, and then hands off further <\/span><\/span><span class=\"TextRun SCXW78342730 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW78342730 BCX0\">scaling logic to the HPA.<\/span><\/span><span class=\"EOP Selected SCXW78342730 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span class=\"TextRun SCXW166913476 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW166913476 BCX0\">This is a massive cost-saver for intermittent batch jobs or internal automation tools.<\/span><\/span><span class=\"EOP Selected SCXW166913476 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h3 id=\"deploying-keda\">Hands-On: Deploying KEDA<\/h3>\n<p>Following your workflow of using <a href=\"https:\/\/opstree.com\/blog\/helm-in-kubernetes\/\" target=\"_blank\" rel=\"noopener\">Helm<\/a> for infrastructure components, installing KEDA is straightforward.<\/p>\n<pre style=\"background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.6;\">helm repo add kedacore https:\/\/kedacore.github.io\/charts\r\n\r\nhelm repo update\r\n\r\nhelm upgrade --install keda kedacore\/keda \\\r\n  --namespace keda \\\r\n  --create-namespace\r\n<\/pre>\n<h3 id=\"define-scaledobject\">Defining a Scaled Object<\/h3>\n<p>To tell KEDA how to scale your application, define a <code>ScaledObject<\/code> custom resource. The example below configures autoscaling based on the number of messages in an AWS SQS queue.<\/p>\n<pre style=\"background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.6;\">apiVersion: keda.sh\/v1alpha1\r\nkind: ScaledObject\r\n\r\nmetadata:\r\n  name: sqs-scaledobject\r\n  namespace: default\r\n\r\nspec:\r\n  scaleTargetRef:\r\n    name: worker-deployment\r\n\r\n  minReplicaCount: 0\r\n  maxReplicaCount: 20\r\n\r\n  triggers:\r\n    - type: aws-sqs-queue\r\n      metadata:\r\n        queueURL: https:\/\/sqs.us-east-1.amazonaws.com\/123456789\/my-queue\r\n        queueLength: \"5\"\r\n        region: us-east-1\r\n<\/pre>\n<h2><span class=\"TextRun SCXW19283778 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW19283778 BCX0\" data-ccp-parastyle=\"heading 3\">Real-World Use Case: Automated Marathon Registration<\/span><\/span><span class=\"EOP Selected SCXW19283778 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:142,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h2>\n<p><span class=\"TextRun SCXW48391922 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW48391922 BCX0\">Consider an automation workflow that processes registrations from a\u00a0<\/span><\/span><span class=\"TextRun SCXW48391922 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW48391922 BCX0\">Google Sheet<\/span><\/span><span class=\"TextRun SCXW48391922 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW48391922 BCX0\">\u00a0and sends notifications via\u00a0<\/span><\/span><span class=\"TextRun SCXW48391922 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW48391922 BCX0\">WhatsApp<\/span><\/span><span class=\"TextRun SCXW48391922 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW48391922 BCX0\">.<\/span><\/span><span class=\"EOP Selected SCXW48391922 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ol>\n<li><span data-contrast=\"auto\">A new entry is added to the sheet.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">A script pushes a message to a queue (e.g., Redis or SQS).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">KEDA<\/span><\/b><span data-contrast=\"auto\"> detects the message, scales your Notification <\/span><span data-contrast=\"auto\">Worker from 0 to 1.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Once the message is <\/span><span data-contrast=\"auto\">processed and the queue is empty, KEDA scales the worker back to 0, <\/span><span data-contrast=\"auto\">ensuring you aren&#8217;t paying for idle compute.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ol>\n<h2><span class=\"TextRun SCXW93655771 BCX0\" lang=\"EN-GB\" xml:lang=\"EN-GB\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW93655771 BCX0\" data-ccp-parastyle=\"heading 3\">HPA vs. KEDA: Which should you use?<\/span><\/span><span class=\"EOP Selected SCXW93655771 BCX0\" data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:142,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-31640 size-full\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/06\/image-49.png\" alt=\"KEDA\" width=\"644\" height=\"564\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/06\/image-49.png 644w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/06\/image-49-300x263.png 300w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/p>\n<h2 aria-level=\"3\"><b><span data-contrast=\"none\">FAQs<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:142,&quot;335559739&quot;:119}\">\u00a0<\/span><\/h2>\n<h4><b><span data-contrast=\"auto\">1. Does KEDA replace the Horizontal Pod Autoscaler?<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">No, KEDA works alongside it. KEDA handles the &#8220;0-to-1&#8221; and &#8220;1-to-0&#8221; transitions and feeds metrics to the HPA to handle 1-to-n scaling.\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">2. Can KEDA scale Kubernetes Jobs instead of Deployments?<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">Yes. You can use a\u00a0<\/span><b><span data-contrast=\"auto\">Scaled Job<\/span><\/b><span data-contrast=\"auto\">\u00a0resource to trigger a new job for each event, which is perfect for long-running tasks that\u00a0shouldn&#8217;t\u00a0be interrupted.\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">3. Is KEDA compatible with Managed Kubernetes like EKS or Azure?<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">Absolutely. It is vendor-agnostic and\u00a0frequently\u00a0used in EKS, AKS, and GKE environments to bridge cloud-native services with Kubernetes workloads.\u00a0<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:274}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">4. How do I handle authentication for event sources?<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">KEDA provides a\u00a0<\/span><b><span data-contrast=\"auto\">Trigger Authentication<\/span><\/b><span data-contrast=\"auto\">\u00a0CRD that allows you to securely provide credentials via environment variables, Kubernetes Secrets, or cloud-native identity (like IAM roles for Service Accounts).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:142,&quot;335559740&quot;:274}\">\u00a0<\/span><\/p>\n<h3>Related Searches<\/h3>\n<ul>\n<li><a href=\"https:\/\/opstree.com\/blog\/a-quick-overview-of-kubernetes-architecture\/\" target=\"_blank\" rel=\"noopener\">A Quick Overview of Kubernetes Architecture!<\/a><\/li>\n<li><a href=\"https:\/\/buildpiper.io\/kubeops-kubernetes-management\/\" target=\"_blank\" rel=\"noopener\">AI-Powered Kubernetes Management for Enterprise Teams<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/blog\/what-is-devsecops\/\" target=\"_blank\" rel=\"noopener\">What Is DevSecOps?<\/a><\/li>\n<\/ul>\n<h3>Related Solutions<\/h3>\n<ul>\n<li><a href=\"https:\/\/opstree.com\/services\/cloud-migration-and-modernization-services\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Cloud Engineering Services<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li><a href=\"https:\/\/opstree.com\/services\/database-and-data-engineering\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Data pipeline development services<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li><a href=\"https:\/\/opstree.com\/services\/application-platform-security-management\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">Platform Engineering Services<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li><a href=\"https:\/\/opstree.com\/observability-in-fintech\/\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">AI-Led FinTech Observability and DevSecOps Platform<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction For DevOps engineers, the standard\u00a0Horizontal Pod\u00a0Autoscaler\u00a0(HPA) is a reliable workhorse for scaling based on CPU and memory. However, in modern event-driven architectures, like the workflow automation tasks you might build with n8n\u00a0or messaging systems like\u00a0Kafka, resource metrics are often a lagging indicator.\u00a0 If your message queue has 10,000 pending tasks, your pods might still [&hellip;]<\/p>\n","protected":false},"author":244582717,"featured_media":31647,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[768739351],"tags":[768739661,768739660,768739309,553793656,246919381,21954763,15989],"class_list":["post-31639","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes-2","tag-autoscaling","tag-keda","tag-kubernetes","tag-kubernetes-deployment","tag-kubernetes-tool","tag-mongodb","tag-postgresql"],"blocksy_meta":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/06\/KEDA.png","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-8ej","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/31639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/244582717"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=31639"}],"version-history":[{"count":5,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/31639\/revisions"}],"predecessor-version":[{"id":31646,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/31639\/revisions\/31646"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/31647"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=31639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=31639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=31639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}