feat(kube): enable metrics

Enable kube-controller-manager, etcd, and kube-scheduler metrics
Also disable kube-proxy metrics since Cilium replaces it

Signed-off-by: Vegard Hagen <[email protected]>
This commit is contained in:
Vegard Hagen
2025-07-31 23:24:03 +02:00
parent 537c4756e8
commit c4f7010759
2 changed files with 64 additions and 1 deletions
@@ -23,12 +23,65 @@ prometheus:
matchLabels: matchLabels:
app: prometheus app: prometheus
# https://github.com/siderolabs/talos/discussions/7214
kubeControllerManager:
enabled: true
serviceMonitor:
relabelings:
- sourceLabels: [ __meta_kubernetes_pod_node_name ]
separator: ;
regex: ^(.*)$
targetLabel: nodename
replacement: $1
action: replace
metricRelabelings:
- action: labeldrop
regex: pod
kubeEtcd:
enabled: true
service:
selector:
# etcd doesn't run as a container,
# but most probably runs on the same nodes that host a controller
k8s-app: kube-controller-manager
serviceMonitor:
relabelings:
- sourceLabels: [ __meta_kubernetes_pod_node_name ]
separator: ;
regex: ^(.*)$
targetLabel: nodename
replacement: $1
action: replace
metricRelabelings:
- action: labeldrop
regex: pod
kubeProxy:
# Cilium replaces Kube Proxy
enabled: false
kubeScheduler:
enabled: true
serviceMonitor:
relabelings:
- sourceLabels: [ __meta_kubernetes_pod_node_name ]
separator: ;
regex: ^(.*)$
targetLabel: nodename
replacement: $1
action: replace
metricRelabelings:
- action: labeldrop
regex: pod
nodeExporter: nodeExporter:
enabled: true enabled: true
grafana: grafana:
enabled: true enabled: true
envFromSecrets: [ {name: grafana-oidc-credentials } ] envFromSecrets: [ { name: grafana-oidc-credentials } ]
grafana.ini: grafana.ini:
security: security:
disable_initial_admin_creation: false disable_initial_admin_creation: false
@@ -1,3 +1,4 @@
# https://www.talos.dev/v1.10/reference/configuration/v1alpha1/config/
machine: machine:
network: network:
interfaces: interfaces:
@@ -18,6 +19,15 @@ cluster:
allowSchedulingOnControlPlanes: true allowSchedulingOnControlPlanes: true
apiServer: apiServer:
${indent(4, api_server)} ${indent(4, api_server)}
controllerManager:
extraArgs:
bind-address: 0.0.0.0
etcd:
extraArgs:
listen-metrics-urls: http://0.0.0.0:2381
scheduler:
extraArgs:
bind-address: 0.0.0.0
network: network:
cni: cni:
name: none name: none