add monitoring
This commit is contained in:
1 parent
2d1909afc4
commit
9f48b84947
5 files changed
+104
No files matched your search
Executable
+1
@@ -0,0 +1 @@
|
||||
kustomize build . --enable-helm | kubectl apply --server-side --force-conflicts -f - &> log.txt
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: monitoring
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- storage.yaml
|
||||
|
||||
helmCharts:
|
||||
- name: kube-prometheus-stack
|
||||
repo: https://prometheus-community.github.io/helm-charts
|
||||
version: 88.2.0
|
||||
releaseName: prometheus
|
||||
namespace: monitoring
|
||||
valuesFile: values.yaml
|
||||
includeCRDs: true
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: monitoring
|
||||
@@ -0,0 +1,21 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: prometheus-manual
|
||||
provisioner: kubernetes.io/no-provisioner
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: prometheus-hostpath-pv
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: prometheus-manual
|
||||
hostPath:
|
||||
path: /root/kubernetes/monitoring/data/prometheus
|
||||
type: DirectoryOrCreate
|
||||
@@ -0,0 +1,61 @@
|
||||
# Disable components K3s packs internally or embeds into the single binary
|
||||
kubeControllerManager:
|
||||
enabled: false
|
||||
|
||||
kubeScheduler:
|
||||
enabled: false
|
||||
|
||||
kubeEtcd:
|
||||
enabled: false
|
||||
|
||||
kubeProxy:
|
||||
enabled: false
|
||||
|
||||
# Enable CoreDNS and Kubelet metrics (K3s standard)
|
||||
coreDns:
|
||||
enabled: true
|
||||
|
||||
kubelet:
|
||||
enabled: true
|
||||
|
||||
# Node Exporter (Gathers host CPU, Memory, Disk, and Network stats)
|
||||
nodeExporter:
|
||||
enabled: true
|
||||
|
||||
# Grafana Web Dashboard Configuration
|
||||
grafana:
|
||||
enabled: true
|
||||
adminPassword: TODO
|
||||
persistence:
|
||||
enabled: false
|
||||
# extraVolumeMounts: # TODO: enable again but another monuntPath (subpaths probably necessary because this one is already used)
|
||||
# - name: storage
|
||||
# mountPath: /var/lib/grafana
|
||||
# extraVolumes:
|
||||
# - name: storage
|
||||
# hostPath:
|
||||
# path: /root/kubernetes/monitoring/data/grafana
|
||||
# type: DirectoryOrCreate
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-issuer"
|
||||
hosts:
|
||||
- grafana.tap-tap.win
|
||||
tls:
|
||||
- hosts:
|
||||
- grafana.tap-tap.win
|
||||
secretName: grafana-tls-secret
|
||||
|
||||
# Prometheus Time-Series Database Configuration
|
||||
prometheus:
|
||||
prometheusSpec:
|
||||
retention: 7d
|
||||
storageSpec:
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: prometheus-manual
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
Reference in new issue
Block a user