-
Make sure you've built the included Dockerfile with
TAG=latest make container
. The image should be tagged asgcr.io/k8s-staging-prometheus-adapter:latest
. -
Create a secret called
cm-adapter-serving-certs
with two values:serving.crt
andserving.key
. These are the serving certificates used by the adapter for serving HTTPS traffic. For more information on how to generate these certificates, see the auth concepts documentation in the apiserver-builder repository. The kube-prometheus project published two scripts gencerts.sh and deploy.sh to create thecm-adapter-serving-certs
secret. -
kubectl create namespace custom-metrics
to ensure that the namespace that we're installing the custom metrics adapter in exists. -
kubectl create -f manifests/
, modifying the Deployment as necessary to point to your Prometheus server, and the ConfigMap to contain your desired metrics discovery configuration.