diff --git a/apps/monitoring/kube-prometheus/base/endpoints.yaml b/apps/monitoring/kube-prometheus/base/endpoints.yaml deleted file mode 100644 index 23e3f5bca..000000000 --- a/apps/monitoring/kube-prometheus/base/endpoints.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Endpoints -metadata: - name: k3s-metrics-service - namespace: kube-system -subsets: - - addresses: - - ip: 192.168.1.2 - - ip: 192.168.1.10 - ports: - - name: https-metrics - port: 10250 - protocol: TCP diff --git a/apps/monitoring/kube-prometheus/base/exporter.yaml b/apps/monitoring/kube-prometheus/base/exporter.yaml index 56497b7a5..15d6180b0 100644 --- a/apps/monitoring/kube-prometheus/base/exporter.yaml +++ b/apps/monitoring/kube-prometheus/base/exporter.yaml @@ -5,5 +5,6 @@ metadata: spec: staticConfigs: - targets: - - k3s-metrics-service.kube-system.svc.cluster.local:10250 + - 192.168.1.2:9100 + - 192.168.1.10:9100 metricsPath: /metrics diff --git a/apps/monitoring/kube-prometheus/base/kustomization.yaml b/apps/monitoring/kube-prometheus/base/kustomization.yaml index 4c16d6195..0ee396e7a 100644 --- a/apps/monitoring/kube-prometheus/base/kustomization.yaml +++ b/apps/monitoring/kube-prometheus/base/kustomization.yaml @@ -1,10 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - endpoints.yaml - prom-rule.yaml - - svc-monitor.yaml - - svc.yaml - exporter.yaml namespace: monitoring diff --git a/apps/monitoring/kube-prometheus/base/svc-monitor.yaml b/apps/monitoring/kube-prometheus/base/svc-monitor.yaml deleted file mode 100644 index 1d78d8d7f..000000000 --- a/apps/monitoring/kube-prometheus/base/svc-monitor.yaml +++ /dev/null @@ -1,85 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - release: kube-prometheus-stack - name: k3s-monitoring - namespace: monitoring -spec: - endpoints: - # /metrics endpoint - - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - honorLabels: true - metricRelabelings: - # apiserver - - action: drop - regex: apiserver_request_duration_seconds_bucket;(0.15|0.2|0.3|0.35|0.4|0.45|0.6|0.7|0.8|0.9|1.25|1.5|1.75|2|3|3.5|4|4.5|6|7|8|9|15|25|40|50) - sourceLabels: - - __name__ - - le - port: https-metrics - relabelings: - - action: replace - sourceLabels: - - __metrics_path__ - targetLabel: metrics_path - scheme: https - tlsConfig: - caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecureSkipVerify: true - # /metrics/cadvisor - - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - honorLabels: true - metricRelabelings: - - action: drop - regex: container_cpu_(cfs_throttled_seconds_total|load_average_10s|system_seconds_total|user_seconds_total) - sourceLabels: - - __name__ - - action: drop - regex: container_fs_(io_current|io_time_seconds_total|io_time_weighted_seconds_total|reads_merged_total|sector_reads_total|sector_writes_total|writes_merged_total) - sourceLabels: - - __name__ - - action: drop - regex: container_memory_(mapped_file|swap) - sourceLabels: - - __name__ - - action: drop - regex: container_(file_descriptors|tasks_state|threads_max) - sourceLabels: - - __name__ - - action: drop - regex: container_spec.* - sourceLabels: - - __name__ - path: /metrics/cadvisor - port: https-metrics - relabelings: - - action: replace - sourceLabels: - - __metrics_path__ - targetLabel: metrics_path - scheme: https - tlsConfig: - caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecureSkipVerify: true - # /metrics/probes - - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - honorLabels: true - path: /metrics/probes - port: https-metrics - relabelings: - - action: replace - sourceLabels: - - __metrics_path__ - targetLabel: metrics_path - scheme: https - tlsConfig: - caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - insecureSkipVerify: true - jobLabel: app.kubernetes.io/name - namespaceSelector: - matchNames: - - kube-system - selector: - matchLabels: - app.kubernetes.io/name: kubelet diff --git a/apps/monitoring/kube-prometheus/base/svc.yaml b/apps/monitoring/kube-prometheus/base/svc.yaml deleted file mode 100644 index b13e19ee7..000000000 --- a/apps/monitoring/kube-prometheus/base/svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: k3s-metrics-service - labels: - app.kubernetes.io/name: kubelet - namespace: kube-system -spec: - clusterIP: None - ports: - - name: https-metrics - port: 10250 - protocol: TCP - targetPort: 10250 - type: ClusterIP