Sunday Blog

人生是一场刻意练习

Kubernetes监控kube-prometheus使用

Kube Prometheus

kube-prometheus github 部署 git clone https://github.com/prometheus-operator/kube-prometheus.git cd kube-prometheus git checkout v0.11.0 # 切换kubernetes兼容版本 首先创建需要的命名空间和 CRDs,等待它们可用后再创建其余资源 kubectl apply --server-side -f manifests/setup kubectl wait \ --for condition=Established

Kube Prometheus 监控 Etcd

Kube Prometheus Etcd

监控外部Etcd 导入etcd证书 kubectl -n monitoring create secret generic etcd-certs \ --from-file=ca.pem=/etc/ssl/etcd/ssl/ca.pem \ --from-file=etcd.pem=/etc/ssl/etcd/ssl/admin-master1.pem \ --from-file=etcd-key.pem=/etc/ssl/etcd/ssl/admin-master1-key.pem prometheus挂载etcd-certs cd /root/kube-prometheus/manifests/ vim prometheus-prometheus.yaml spec: ... secrets: - etcd-certs kubectl apply -f prometheus-prometheus.yaml 验证 [root@master1 manifests]# kubectl exec

Kube Prometheus 监控Scheduler Controller Manager

Kube Prometheus Scheduler Controller Manager

监控scheduler和controller-manager 问题 kube-prometheus安装后,我们可以看到监控指标大部分的配置都是正