<p>Is it possible to start or stop Kubernets PODS based on some events like a Kafka event?</p>

<p>For e.g., if there is an event that some work is complete and based on that I want to bring down a POD or bring a POD up. In my case, minimum replicas of the PODs keep running even though they are not required to be running for the most part of the day.</p>

Ashish Abrol
<p>Pods with <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="nofollow noreferrer">Horizontal Pod Autoscaling</a> based on <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-custom-metrics" rel="nofollow noreferrer">custom metrics</a> is the option you are looking for.</p>

<p>Probably you instrument your code with custom Prometheus metrics. In your case it is publishing a metric in Prometheus that says the number of messages available for processing at a point in time. Then use that custom Prometheus metric to scale pods on that basis.</p>
