prometheus-adapter/deploy
Damien Grisonnet 03e8eb8ddb Makefile: consolidate docker-build
As part of this commit, I upgraded the golang image used for building to
1.16 and consolidated how the docker-build rule was working. Previously,
it was failing in master's CI because the go modules were not downloaded
in the build image. To improve that, I replaced the combination of
docker run and docker build by a multi-stage Dockerfile responsible for
building the adapter and running it.

In addition to that, I removed the `_output` directory completely as it
wasn't really meaningful to have it anymore. I also removed the
`build-local-image` rule as it was a duplicate of the `docker-build`
rule with the only different of using a scratch base image.

Also, since all the base images that we are using by default are based
on busybox, I change the UID used in the image to 65534 which correspond
to the nobody user in busybox.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2021-06-02 17:12:27 +02:00
..
manifests Fix documented metrics labels to work for k8s 1.16+ 2021-03-23 09:01:56 -05:00
README.md Updating deploy/README.md to fix links 2021-04-03 18:55:16 -07:00

Example Deployment

  1. Make sure you've built the included Dockerfile with make docker-build. The image should be tagged as directxman12/k8s-prometheus-adapter:latest.

  2. Create a secret called cm-adapter-serving-certs with two values: serving.crt and serving.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 the cm-adapter-serving-certs secret.

  3. kubectl create namespace custom-metrics to ensure that the namespace that we're installing the custom metrics adapter in exists.

  4. 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.