以下是在CentOS上搭建K8s监控的常见方案:
kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml。prometheus.yaml文件,定义副本数、资源请求、存储等配置,应用配置kubectl apply -f prometheus.yaml。kubectl apply -f https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana/grafana.yaml。