mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
Provide basic deployment instructions
This commit introduces a Dockerfile with some basic deployment instructions, as well as a makefile for convinience.
This commit is contained in:
parent
4dd94c3c85
commit
66cf5eaafb
4 changed files with 79 additions and 0 deletions
8
deploy/Dockerfile
Normal file
8
deploy/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
FROM scratch
|
||||
|
||||
COPY adapter /
|
||||
|
||||
USER 1001:1001
|
||||
|
||||
ENTRYPOINT ["/adapter"]
|
||||
|
||||
17
deploy/README.md
Normal file
17
deploy/README.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Example Deployment
|
||||
==================
|
||||
|
||||
1. Make sure you've built the included Dockerfile with `make
|
||||
docker-build`. The image should be tagged as `cm-adapter:latest`.
|
||||
|
||||
2. Create a secret called `cm-adapter-serving-certs` with two values:
|
||||
`serving.crt` and `serving.key`. For more information on how to
|
||||
generate these certificates, see the [auth concepts
|
||||
documentation](https://github.com/kubernetes-incubator/apiserver-builder/blob/master/docs/concepts/auth.md)
|
||||
in the apiserver-builder repository.
|
||||
|
||||
3. `kubectl create -f example-deployment.yaml`, modifying as necessary to
|
||||
point to your prometheus server.
|
||||
|
||||
|
||||
|
||||
41
deploy/example-deployment.yaml
Normal file
41
deploy/example-deployment.yaml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: cm-adapter
|
||||
name: cm-adapter
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cm-adapter
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: cm-adapter
|
||||
name: cm-adapter
|
||||
spec:
|
||||
containers:
|
||||
- name: cm-adapter
|
||||
image: cm-adapter
|
||||
imagePullPolicy: Never
|
||||
args:
|
||||
- "/cm-adapter"
|
||||
- "--secure-port=6443"
|
||||
- "--tls-cert-file=/var/run/serving-cert/serving.crt"
|
||||
- "--tls-private-key-file=/var/run/serving-cert/serving.key"
|
||||
- "--logtostderr=true"
|
||||
- "--prometheus-url=http://prometheus.prom.svc:9090/"
|
||||
- "--metrics-relist-interval=30s"
|
||||
- "--rate-interval=30s"
|
||||
- "--v=10"
|
||||
ports:
|
||||
- containerPort: 6443
|
||||
volumeMounts:
|
||||
- mountPath: /var/run/serving-cert
|
||||
name: volume-serving-cert
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: volume-serving-cert
|
||||
secret:
|
||||
secretName: cm-adapter-serving-certs
|
||||
Loading…
Add table
Add a link
Reference in a new issue