Kubernetes HOWTO - Scale your app using HPA with custom metrics

  Рет қаралды 7,569

Lachlan Evenson

Lachlan Evenson

Күн бұрын

Пікірлер: 7
@mrballcb
@mrballcb 6 жыл бұрын
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.
@vfzee
@vfzee 6 жыл бұрын
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 ! :)
@jdnva
@jdnva 6 жыл бұрын
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
@VasudevHV
@VasudevHV 6 жыл бұрын
When I run `kubectl get hpa`, the TARGET column says /10. What am I doing wrong?
@LachlanEvenson
@LachlanEvenson 6 жыл бұрын
Can you confirm if the following is working from these steps - github.com/Azure-Samples/virtual-node-autoscale#deploy-the-prometheus-metric-adapter
@cosmingabrielpetrenciuc6139
@cosmingabrielpetrenciuc6139 6 жыл бұрын
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"
@cosmingabrielpetrenciuc6139
@cosmingabrielpetrenciuc6139 6 жыл бұрын
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.
Horizontal Pod Autoscaler Reloaded - Scale on Custom Metrics - Maciej Pytel & Solly Ross
29:33
CNCF [Cloud Native Computing Foundation]
Рет қаралды 9 М.
Custom metrics for applications in Prometheus on Kubernetes
24:22
That DevOps Guy
Рет қаралды 19 М.
Every team from the Bracket Buster! Who ya got? 😏
0:53
FailArmy Shorts
Рет қаралды 13 МЛН
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
Learn Kubernetes with Google: HPA: Scaling using Custom Metrics
11:02
Google Open Source
Рет қаралды 10 М.
Kubernetes RBAC Explained
23:17
Anton Putra
Рет қаралды 17 М.
Prometheus Custom Metrics
14:02
Pavan Elthepu
Рет қаралды 10 М.
[ Kube 35 ] Using Horizontal Pod Autoscaler in Kubernetes
24:59
Just me and Opensource
Рет қаралды 38 М.
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 349 М.
OSS Unboxing - Kubernetes vscode extension
9:18
Lachlan Evenson
Рет қаралды 3,8 М.
Why You Shouldn't Use K8s Autoscaling?!!
9:35
YourTechBud Codes
Рет қаралды 2,2 М.
[ Kube 58 ] Using Vertical Pod Autoscaling in Kubernetes
22:55
Just me and Opensource
Рет қаралды 10 М.
Every team from the Bracket Buster! Who ya got? 😏
0:53
FailArmy Shorts
Рет қаралды 13 МЛН