LadiesTailor Posted July 21, 2022 Report Share Posted July 21, 2022 1 hour ago, hunkyfunky2 said: I can help if you are stuck, we did similar thing Post here baaa or post it to GitHub and share the link Quote Link to comment Share on other sites More sharing options...
hunkyfunky2 Posted July 21, 2022 Report Share Posted July 21, 2022 kind: HorizontalPodAutoscaler apiVersion: autoscaling/v2beta2 metadata: name: request-hpa spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: app-deployment minReplicas: {{ .Values.hpa.minReplicas }} maxReplicas: {{ .Values.hpa.maxReplicas }} metrics: - type: External external: metric: name: requests_avg target: type: Value value: {{ .Values.hpa.targetValue }} Above HPA , there is nothing special about it. Actual part is to expose the metrics to Prometheus - it depends on application - for ex: if it is Java/ SpringBoot then you can use io.micrometer.core.instrument.Metrics.counter. Whats left is prometheus adapter configuration - see documentation at https://github.com/kubernetes-sigs/prometheus-adapter and walk through - it has examples of how to add "rules". https://github.com/kubernetes-sigs/prometheus-adapter/blob/master/docs/walkthrough.md 1 Quote Link to comment Share on other sites More sharing options...
hunkyfunky2 Posted July 21, 2022 Report Share Posted July 21, 2022 I can post the rules section we used - but it is not much different from what is there in the documentation link I posted. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.