27 lines
751 B
YAML
27 lines
751 B
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: install-kube-prometheus-crds
|
|
namespace: monitoring
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: helm
|
|
image: alpine/helm:3.14.0
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- |
|
|
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
|
helm repo update
|
|
helm pull prometheus-community/kube-prometheus-stack --version 72.6.3
|
|
tar -xzf kube-prometheus-stack-72.6.3.tgz
|
|
kubectl apply -f kube-prometheus-stack/crds
|
|
volumeMounts:
|
|
- name: kubeconfig
|
|
mountPath: /root/.kube
|
|
restartPolicy: Never
|
|
serviceAccountName: default
|
|
backoffLimit: 1
|