kubernetes-sigs / prometheus-adapter

An implementation of the custom.metrics.k8s.io API using Prometheus
Apache License 2.0
1.9k stars 551 forks source link

install prometheus adapter in k8s, but failed, and the logs showing "exec /adapter: exec format error" #627

Open skywaterxyz opened 8 months ago

skywaterxyz commented 8 months ago

What happened?: I am installing prometheus in k8s, but failed by step of installing prometheus adapter, and the logs showing "exec /adapter: exec format error" image image

I searched from the internet and still can not find the exactly problem. So I hope to get help here, what my be the exactly problem and how to resolve it? What did you expect to happen?: intall prometheus adapter successfully. Please provide the prometheus-adapter config:

prometheus-adapter config **Anything else we need to know?**: **Environment**: - prometheus-adapter version: - prometheus version: v0.11.1 - Kubernetes version (use `kubectl version`): v1.26.0 - Cloud provider or hardware configuration: - Other info:
logicalhan commented 8 months ago

/triage accepted /assign @dgrisonnet

manfredxue commented 2 months ago

You need to correct 2 files as blow:

vim prometheus-adapter-deployment.yaml

39 image: willdockerhub/prometheus-adapter:v0.9.1 40 #image: k8s.gcr.io/prometheus-adapter/prometheus-adapter:v0.9.0

vim kube-state-metrics-deployment.yaml

34 image: bitnami/kube-state-metrics:latest 35 #image: k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.1.1 These 2 pods's logs showing "exec /adapter: exec format error"