-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not sure how to install the adapter #96
Comments
Hi, Running the adapter locally is not so helpful as it needs to be in a cluster to be useful. We provide all the needed manifests for deploying here: https://github.com/zalando-incubator/kube-metrics-adapter/tree/master/docs just apply them one by one. We currently don't provide a helm chart, and I'm afraid that the https://hub.helm.sh/charts/banzaicloud-stable/kube-metrics-adapter chart may be out-of-date. I'll add a quick section to the README, so it's more clear how to deploy it. |
@mikkeloscar thanks a lot. does it work when I deploy the manifests on AWS Kops? also I need to change the aws region accordingly? https://github.com/zalando-incubator/kube-metrics-adapter/blob/master/docs/deployment.yaml#L32-L33 ok how can I use this adapter do hpa by latency rather than by cpu?
|
The region is only relevant for the SQS metrics, if you don't need it you can leave it out I believe. If you want to scale on something like p99 then you need a way to collect those metrics, prometheus would be an obvious choice. If you have prometheus setup you can configure an HPA like shown in this example: Note that your kube-metrics-adapter needs to be configured with the prometheus endpoint. Here's an example from how we run it: https://github.com/zalando-incubator/kubernetes-on-aws/blob/6d7835a5906847837ec905e43573eb8b9e8dc0f6/cluster/manifests/kube-metrics-adapter/deployment.yaml#L38 |
Hi @Arnold1, we've upgraded the helm chart in our repo, https://hub.helm.sh/charts/banzaicloud-stable/kube-metrics-adapter/0.1.1 so you can use it if you want. |
Hello @mikkeloscar, were you ever able to add that section to the README? I actually had to come here to figure out how to do it as a newbie. |
Hello, and sorry for commenting on an old issue. But I am new to this k8s world and I'm just trying to get the HPA to work properly for the PHP application at my work. How do I get this to run in our GKE instance? I'm sorry for these noob questions. I'm just trying to learn and understand. And learning k8s on GKE hasn't been the easiest with all these differences. |
@AnthonMS in general apply CRD and RBAC first, but keep in mind this is a "cluster service", it's not for only a single application. The hpa object can then have "more" features with kube-metrics-adapter running. |
@szuecs thank you for the quick reply. I have tried setting up the adapter by applying all the yaml files from docs dir. And I started out by applying CRD and RBAC first. I do not seem to get any errors, but the HPA I create with custom metrics are all failing. Under targets it says Unknown/1k. I assume that's because the custom metric isn't working. I have tried all the different ports that makes sense in our setup. 8000, 8080, 9000, 9090, 80. None of them gives a different result under target. I do not understand what it is I'm doing wrong, but I just haven't found a way to get custom metrics without having a ton of knowledge about k8s. I'm trying to build this knowledge, but nothing works... I have no idea what I'm doing. Is there any help at all out there, that's up to date and tells how I get custom metrics in a GKE cluster?? |
@AnthonMS maybe ask GKE support, if it's possible to run kube-metrics-adapter in GKE. I am not sure if all requirements are made. One problem could be your kubernetes version and the external-metrics-apiservice.yaml:
Maybe in your kubernetes version it's not v1beta1 but v1, for example. |
@szuecs It seems to supports it from what I have read. I have also added a comment on issue #254 since I am getting the same errors. I have just ran the logs command as he did, and I get the same error that connection was refused on ip:port/metrics. Do I need to host a /metrics myself that has the metrics I would like to scale based on? I thought this adapter made it possible to scale based on request_pet_second to a pod in itself? I can get the hipages/php-fpm_exporter container to export fpm metrics to /metrics, but I have removed this container as of now because I couldn't get those metrics to be available to k8s. Do I need another container to export pod metrics? |
Requests per second is possible if you run skipper as ingress controller https://opensource.zalando.com/skipper/kubernetes/ingress-controller/ |
Expected Behavior
Actual Behavior
im not sure how to install the adapter. make was working fine. but when I start the kube-metrics-adapter binary I get some error. is there more doc somewhere, which I missed to read?
is there an official helm chart to install the adapter - which works with aws Kops?
what I found is this:
https://hub.helm.sh/charts/banzaicloud-stable/kube-metrics-adapter
can I use this helm chart for install the zalando metrics-server?
currently I have this metrics-server installed, will I need to deinstall it to use zalando metrics-server?
Steps to Reproduce the Problem
Specifications
Platform:
I locally have Mac osx
Subsystem:
aws kops with k8s
The text was updated successfully, but these errors were encountered: