提交 c71abdbe 编写于 作者: 阳明的博客's avatar 阳明的博客

prometheus operator更新版本

上级 2c7624e6
......@@ -313,6 +313,12 @@ Jenkins 安装完成了,接下来我们不用急着就去使用,我们要了
![kubernetes plugin config5](https://bxdc-static.oss-cn-beijing.aliyuncs.com/images/jenkins-k8s-config5.png)
还有一些同学在配置完成后发现启动 Jenkins Slave Pod 的时候,出现 Slave Pod 连接不上,然后尝试100次连接之后销毁 Pod,然后会再创建一个 Slave Pod 继续尝试连接,无限循环,类似于下面的信息:
![](https://bxdc-static.oss-cn-beijing.aliyuncs.com/images/slave-pod-reconnect-100-times.png)
如果出现这种情况的话就需要将 Slave Pod 中的运行命令和参数两个值给清空掉
![](https://bxdc-static.oss-cn-beijing.aliyuncs.com/images/clean-slave-pod-cmd-args.png)
到这里我们的 Kubernetes Plugin 插件就算配置完成了。
......
......@@ -29,14 +29,16 @@
## 安装
我们这里直接通过 Prometheus-Operator 的源码来进行安装,当然也可以用 Helm 来进行一键安装,我们采用源码安装可以去了解更多的实现细节。首页将源码 Clone 下来:
```shell
$ git clone https://github.com/coreos/prometheus-operator
$ cd contrib/kube-prometheus/manifests/
$ git clone https://github.com/coreos/kube-prometheus.git
$ cd manifests
$ ls
00namespace-namespace.yaml node-exporter-clusterRole.yaml
0prometheus-operator-0alertmanagerCustomResourceDefinition.yaml node-exporter-daemonset.yaml
......
```
> 最新的版本官方将资源[https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus](https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus)迁移到了独立的 git 仓库中:[https://github.com/coreos/kube-prometheus.git](https://github.com/coreos/kube-prometheus.git)
进入到 manifests 目录下面,这个目录下面包含我们所有的资源清单文件,我们需要对其中的文件 prometheus-serviceMonitorKubelet.yaml 进行简单的修改,因为默认情况下,这个 ServiceMonitor 是关联的 kubelet 的10250端口去采集的节点数据,而我们前面说过为了安全,这个 metrics 数据已经迁移到10255这个只读端口上面去了,我们只需要将文件中的`https-metrics`更改成`http-metrics`即可,这个在 Prometheus-Operator 对节点端点同步的代码中有相关定义,感兴趣的可以[点此查看完整代码](https://github.com/coreos/prometheus-operator/blob/7a8bc75512e39a984f46b2788b5fa9bf64999571/pkg/prometheus/operator.go#L400)
```go
Subsets: []v1.EndpointSubset{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册