Search code examples
kubernetesminikubeautoscalinghpahorizontal-pod-autoscaling

How to send the data from HPA to external API service


I am currently working in dynamic scaling of services with custom metrics and I wanted to send some data from HPA to my external API service. Is there any way or any post request which will send the current replica count to my external API ? Like HPA has its sync period and it sends GET request to API to fetch the metric value so is there any way to also have some POST request so that I can get some data from HPA ?


Solution

  • You don't per se, your service can watch the Kubernetes API for updates like everything else though. All components in Kubernetes communicate through the API.