Enable node level monitoring
This commit is contained in:
@@ -1,24 +1,135 @@
|
|||||||
|
# This doesn't seem to make enough of the things
|
||||||
|
# visible, still, and will still generate
|
||||||
|
# a 403 error when hitting the kubelet and
|
||||||
|
# cadvisor endpoints, so we use
|
||||||
|
# cluster-admin down farther
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
name: prometheus
|
labels:
|
||||||
|
app.kubernetes.io/component: exporter
|
||||||
|
app.kubernetes.io/name: kube-state-metrics
|
||||||
|
app.kubernetes.io/part-of: kube-prometheus
|
||||||
|
app.kubernetes.io/version: 2.17.0
|
||||||
|
name: kube-state-metrics
|
||||||
rules:
|
rules:
|
||||||
- apiGroups: [""]
|
- apiGroups:
|
||||||
|
- ""
|
||||||
resources:
|
resources:
|
||||||
|
- configmaps
|
||||||
|
- secrets
|
||||||
- nodes
|
- nodes
|
||||||
- services
|
|
||||||
- endpoints
|
|
||||||
- pods
|
- pods
|
||||||
|
- services
|
||||||
|
- serviceaccounts
|
||||||
|
- resourcequotas
|
||||||
|
- replicationcontrollers
|
||||||
|
- limitranges
|
||||||
|
- persistentvolumeclaims
|
||||||
|
- persistentvolumes
|
||||||
|
- namespaces
|
||||||
|
- endpoints
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- extensions
|
- apps
|
||||||
resources:
|
resources:
|
||||||
|
- statefulsets
|
||||||
|
- daemonsets
|
||||||
|
- deployments
|
||||||
|
- replicasets
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- batch
|
||||||
|
resources:
|
||||||
|
- cronjobs
|
||||||
|
- jobs
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- autoscaling
|
||||||
|
resources:
|
||||||
|
- horizontalpodautoscalers
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- authentication.k8s.io
|
||||||
|
resources:
|
||||||
|
- tokenreviews
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- apiGroups:
|
||||||
|
- authorization.k8s.io
|
||||||
|
resources:
|
||||||
|
- subjectaccessreviews
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- apiGroups:
|
||||||
|
- policy
|
||||||
|
resources:
|
||||||
|
- poddisruptionbudgets
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- certificates.k8s.io
|
||||||
|
resources:
|
||||||
|
- certificatesigningrequests
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- discovery.k8s.io
|
||||||
|
resources:
|
||||||
|
- endpointslices
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- storage.k8s.io
|
||||||
|
resources:
|
||||||
|
- storageclasses
|
||||||
|
- volumeattachments
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- admissionregistration.k8s.io
|
||||||
|
resources:
|
||||||
|
- mutatingwebhookconfigurations
|
||||||
|
- validatingwebhookconfigurations
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- networking.k8s.io
|
||||||
|
resources:
|
||||||
|
- networkpolicies
|
||||||
|
- ingressclasses
|
||||||
- ingresses
|
- ingresses
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- coordination.k8s.io
|
||||||
|
resources:
|
||||||
|
- leases
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- rbac.authorization.k8s.io
|
||||||
|
resources:
|
||||||
|
- clusterrolebindings
|
||||||
|
- clusterroles
|
||||||
|
- rolebindings
|
||||||
|
- roles
|
||||||
|
verbs:
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
---
|
---
|
||||||
@@ -34,7 +145,8 @@ metadata:
|
|||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: prometheus
|
name: cluster-admin
|
||||||
|
#name: prometheus
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: prometheus
|
name: prometheus
|
||||||
|
|||||||
@@ -73,12 +73,13 @@ data:
|
|||||||
tls_config:
|
tls_config:
|
||||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||||
metrics_path: /metrics/cadvisor
|
metrics_path: /metrics/cadvisor
|
||||||
authorization:
|
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||||
credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
#authorization:
|
||||||
|
# credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||||
# This scrapes Service endpoints in Kubernetes
|
# This scrapes Service endpoints in Kubernetes
|
||||||
- job_name: 'k8sservices'
|
- job_name: 'k8sservices'
|
||||||
kubernetes_sd_configs:
|
kubernetes_sd_configs:
|
||||||
- role: endpoints
|
- role: endpointslice
|
||||||
relabel_configs:
|
relabel_configs:
|
||||||
- source_labels:
|
- source_labels:
|
||||||
- __meta_kubernetes_namespace
|
- __meta_kubernetes_namespace
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ in
|
|||||||
443
|
443
|
||||||
5432
|
5432
|
||||||
6443
|
6443
|
||||||
|
10250
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
if cfg.agentOnly then
|
if cfg.agentOnly then
|
||||||
@@ -115,6 +116,7 @@ in
|
|||||||
"--write-kubeconfig-group kubeconfig"
|
"--write-kubeconfig-group kubeconfig"
|
||||||
"--resolv-conf=/etc/resolv.conf"
|
"--resolv-conf=/etc/resolv.conf"
|
||||||
"--node-label node.longhorn.io/create-default-disk=config"
|
"--node-label node.longhorn.io/create-default-disk=config"
|
||||||
|
"--supervisor-metrics=true"
|
||||||
"--tls-san ${config.networking.hostName}.home"
|
"--tls-san ${config.networking.hostName}.home"
|
||||||
"--tls-san ${config.networking.hostName}.thehellings.lan"
|
"--tls-san ${config.networking.hostName}.thehellings.lan"
|
||||||
"--tls-san ${config.networking.hostName}.shire-zebra.ts.net"
|
"--tls-san ${config.networking.hostName}.shire-zebra.ts.net"
|
||||||
|
|||||||
Reference in New Issue
Block a user