Namespace | Kubernetes Object Name | Type | Resource Amount | Description |
<Prometheus instance ID> | proxy-agent | Deployment | 0.25C256Mi*2 | Collection proxy |
<Prometheus instance ID> | <Prometheus instance ID> | ServiceAccount | - | Permission carrier |
- | <Prometheus instance ID> | ClusterRole | - | Collection permissions related |
- | <Prometheus instance ID>-crb | ClusterRoleBinding | - | Collection permissions related |
Feature | Involved Objects | Involved Operation Permissions |
Collection configuration management | scrapeconfigs,servicemonitors,podmonitors,probes,configmaps,secrets,namespaces | get/list/watch |
Service discovery | services,endpoints,nodes,pods,ingresses | get/list/watch |
Scraping some system component metrics | nodes/metrics,nodes/proxy,pods/proxy | get/list/watch |
Scraping metrics with RBAC authentication | /metrics,/metrics/cadvisor | get |
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:name: prom-instancerules:- apiGroups:- monitoring.coreos.comresources:- scrapeconfigs- servicemonitors- podmonitors- probes- prometheuses- prometheusrulesverbs:- get- list- watch- apiGroups:- ""resources:- namespaces- configmaps- secrets- nodes- services- endpoints- podsverbs:- get- list- watch- apiGroups:- networking.k8s.ioresources:- ingressesverbs:- get- list- watch- apiGroups: [ "" ]resources:- nodes/metrics- nodes/proxy- pods/proxyverbs:- get- list- watch- nonResourceURLs: [ "/metrics", "/metrics/cadvisor" ]verbs:- get
Namespace | Kubernetes Object Name | Type | Resource Amount | Description |
kube-system | tke-kube-state-metrics | Statefulset | 0.5C512Mi | Collection program |
kube-system | tke-kube-state-metrics | ServiceAccount | - | Permission carrier |
- | tke-kube-state-metrics | ClusterRole | - | Collection permissions related |
- | tke-kube-state-metrics | ClusterRoleBinding | - | Collection permissions related |
kube-system | tke-kube-state-metrics | Service | - | Collection agent corresponding service, for service discovery use |
kube-system | tke-kube-state-metrics | ServiceMonitor | - | Collection configuration |
kube-system | tke-kube-state-metrics | Role | - | Shard collection permission related |
kube-system | tke-kube-state-metrics | RoleBinding | - | Shard collection permission related |
Feature | Involved Objects | Involved Operation Permissions |
Listening to the status of various resources in the cluster | Most Kubernetes resources | list/watch |
Get the shard number of the collection pod | statefulsets, pods | get |
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:name: tke-kube-state-metricsrules:- apiGroups:- ""resources:- configmaps- secrets- nodes- pods- services- serviceaccounts- resourcequotas- replicationcontrollers- limitranges- persistentvolumeclaims- persistentvolumes- namespaces- endpointsverbs:- list- watch- apiGroups:- appsresources:- statefulsets- daemonsets- deployments- replicasetsverbs:- list- watch- apiGroups:- batchresources:- cronjobs- jobsverbs:- list- watch- apiGroups:- autoscalingresources:- horizontalpodautoscalersverbs:- list- watch- apiGroups:- authentication.k8s.ioresources:- tokenreviewsverbs:- create- apiGroups:- authorization.k8s.ioresources:- subjectaccessreviewsverbs:- create- apiGroups:- policyresources:- poddisruptionbudgetsverbs:- list- watch- apiGroups:- certificates.k8s.ioresources:- certificatesigningrequestsverbs:- list- watch- apiGroups:- storage.k8s.ioresources:- storageclasses- volumeattachmentsverbs:- list- watch- apiGroups:- admissionregistration.k8s.ioresources:- mutatingwebhookconfigurations- validatingwebhookconfigurationsverbs:- list- watch- apiGroups:- networking.k8s.ioresources:- networkpolicies- ingressesverbs:- list- watch- apiGroups:- coordination.k8s.ioresources:- leasesverbs:- list- watch- apiGroups:- rbac.authorization.k8s.ioresources:- clusterrolebindings- clusterroles- rolebindings- rolesverbs:- list- watch---kind: Rolemetadata:name: tke-kube-state-metricsnamespace: kube-systemrules:- apiGroups:- ""resources:- podsverbs:- get- apiGroups:- appsresourceNames:- tke-kube-state-metricsresources:- statefulsetsverbs:- get
Namespace | Kubernetes Object Name | Type | Resource Amount | Description |
kube-system | tke-node-exporter | DaemonSet | 0.1C180Mi*node amount | Collection program |
kube-system | tke-node-exporter | Service | - | Collection program corresponding service, for service discovery use |
kube-system | tke-node-exporter | ServiceMonitor | - | Collection configuration |
Was this page helpful?