企业入门实战--k8s之prometheus的部署
部署
先拉取需要的仓库 新建项目kubeapps用来上传镜像
首先添加仓库
helm repo add aliyun https://apphub.aliyuncs.com
helm search repo prometheus-operator
helm pull prometheus-operator
tar zxf prometheus-operator-8.7.0.tgz
cd prometheus-operator/
vim /root/helm/prometheus-operator/values.yaml
vim grafana/values.yaml
vim kube-state-metrics/values.yaml
kubectl create namesapce prometheus-operator
helm install prometheus-operator . -n prometheus-operator
kubectl -n prometheus-operator get pod
kubectl -n prometheus-operator get all
kubectl get svc -n ingress-nginx
在宿主机中添加解析
172.25.5.10
kubeapps.westos.org myapp.wesots.org prometheus.westos.org
grafana.westos.org
测试:
|