This is awesome because, at least for me, it's more instructional about custom metrics. We use hpa's but since our app uses so little cpu, it's not really done anything yet other than scale up pod counts during deployments when a node happens to be doing a lot of work pulling and extracting images. We've not yet delved into custom metrics, but are studying it and I strongly suspect we can use it to be more effective than plain ole cpu based scaling. I searched your past articles but didn't see anything on custom metrics, so thank you for this one that covers so much of that topic.
@vfzee6 жыл бұрын
Amazing tutorial! Thank you!! Let me ask you a question: Do you know how I can use the external metrics api to fetch azure storage queue metrics? I am almost getting there... but my HPA yaml is wrong... but I can't find any examples of it... The azure bus queue example is the closest I found... I replace the corresponding values but I cant get it to work properly :( Did you try an implementation of this type so you can share? Again, greate tutorial ! :)
@jdnva6 жыл бұрын
Thanks mate! I have been thinking about how to increase the number of replicas, thus failure resilience, in services which are nearing spending their error budget. This could be a great approach
@VasudevHV6 жыл бұрын
When I run `kubectl get hpa`, the TARGET column says /10. What am I doing wrong?
@LachlanEvenson6 жыл бұрын
Can you confirm if the following is working from these steps - github.com/Azure-Samples/virtual-node-autoscale#deploy-the-prometheus-metric-adapter
@cosmingabrielpetrenciuc61396 жыл бұрын
Me too. I've followed your video tutorial with only one difference. Before deploying the adapter I've created the azure-k8s-metric-adapter-sp service principal, assigned the role Monitoring Reader to it and created the secret azure-k8s-metrics-adapter in custom-metrics namespace. However, when I execute the command kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/namespaces/default/pods/*/performanceCounters-requestsPerSecond" I get the following error: Error from server (BadRequest): insights.MetricsClient#GetMultiple: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="PathNotFoundError" Message="The requested path does not exist"
@cosmingabrielpetrenciuc61396 жыл бұрын
I have finally figured it out. The file ./deploy/adapter.yaml is incomplete. It doesn't specify the environment variables APP_INSIGHTS_APP_ID and APP_INSIGHTS_KEY. You need to modify this file before applying it and add the following lines in the env array of azure-k8s-metrics-adapter deployment: - name: APP_INSIGHTS_APP_ID valueFrom: secretKeyRef: name: app-insights-api key: app-insights-app-id - name: APP_INSIGHTS_KEY valueFrom: secretKeyRef: name: app-insights-api key: app-insights-key Also, you have to apply the file .\samples equest-per-second\deploy\custom-metric.yaml because the horizontal pod autoscaler defined in .\samples equest-per-second\deploy\hpa.yaml uses the metric named "rps" defined in custom-metric.yaml.