categraf/k8s
kongfei a2f8facb0a add resource view dashboard for pod 2022-09-19 12:06:36 +08:00
..
images update k8s readme with dashboards show 2022-08-20 08:13:58 +08:00
README.md update k8s readme 2022-08-20 08:15:47 +08:00
apiserver-dash.json add etcd dashboards 2022-08-09 19:28:10 +08:00
categraf.tpl update daemonset template 2022-06-17 11:13:28 +08:00
cm-dash.json add etcd dashboards 2022-08-09 19:28:10 +08:00
controller-service.yaml delete cluster ip for controller-service 2022-07-26 10:31:09 +08:00
coredns-dash.json update dashboard for k8s 2022-08-08 16:00:48 +08:00
daemonset.yaml fix spelling error 2022-07-13 16:18:44 +08:00
deployment-etcd-http.yaml scrape etcd in http mode 2022-07-26 16:12:13 +08:00
deployment.yaml update deployment.yaml 2022-07-26 15:20:20 +08:00
etcd-dash.json feat: serveral changes (#172) 2022-08-29 17:56:17 +08:00
etcd-service-http.yaml scrape etcd in http mode 2022-07-26 16:12:13 +08:00
etcd-service.yaml monitoring etcd 2022-07-26 12:02:13 +08:00
gen_ds.sh sidecar demo 2022-06-28 15:41:39 +08:00
in_cluster_scrape.yaml comment static_config 2022-07-26 12:07:46 +08:00
pod-dash.json add resource view dashboard for pod 2022-09-19 12:06:36 +08:00
scheduler-dash.json add etcd dashboards 2022-08-09 19:28:10 +08:00
scheduler-service.yaml add config for kube-controller-manager and kube-scheduler 2022-07-26 10:31:09 +08:00
scrape_with_cafile.yaml comment static_config 2022-07-26 12:12:23 +08:00
scrape_with_kubeconfig.yaml comment static_config 2022-07-26 12:12:23 +08:00
scrape_with_token.yaml comment static_config 2022-07-26 12:12:23 +08:00
sidecar.yaml Update sidecar version number 2022-09-15 12:41:33 +08:00

README.md

monitoring kubernetes control plane with plugin prometheus

if your control plane is in pod, for example, you use kubeadm build k8s cluster. Then kube-controller-manager, kube-scheduler and etcd need some extra work to be discovery.

create service for kube-controller-manager

  1. kubectl apply -f controller-service.yaml
  2. edit /etc/kubernetes/manifests/kube-controller-manager.yaml , modify or add one line - --bind-address=0.0.0.0
  3. wait kube-controller-manager to restart

create service for kube-scheduler

  1. kubectl apply -f scheduler-service.yaml
  2. edit /etc/kubernetes/manifests/kube-scheduler.yaml , modify or add one line - --bind-address=0.0.0.0
  3. wait kube-scheduler to restart

create service for etcd

  1. kubectl apply -f etcd-service-http.yaml
  2. edit /etc/kubernetes/manifests/etcd.yaml , modify - --listen-metrics-urls=http://127.0.0.1:2381 to - --listen-metrics-urls=http://0.0.0.0:2381
  3. wait etcd to restart

create all other objects with deployment

  1. edit deployment.yaml and modify it with your own configure.

    i. replace ${CATEGRAF_NAMESPACE} which located in ClusterRoleBinding part

    ii. replace ${NSERVER_SERVICE_WITH_PORT} which located in ConfigMap part config.toml and in_cluster_scrape.yaml

    if you choose etcd-service.yaml with https mode, then kubectl apply -f etcd-service.yaml.

    iii. replace {data of your etcd ca file} {data of your etcd client cert file} {data of your etcd client key file} in ConfigMap etcd-pki.

  2. kubectl apply -f deployment-etcd-http.yaml -n monitoring

Make sure that deployment.yaml always appears with etcd-service.yaml and deployment-etcd-http appears with etcd-service-http.yaml. They cannot be apply at the same time.

dashboards show


apiserver-dashboards


controller-dashboards


scheduler-dashboards


etcd-dashboards


coredns-dashboards