我试图在CentOS 7上设置Crunchydata/Postgres操作符,方法是遵循这个链接。配置设置如下
CentOS: CentOS Linux 7 (Core)库贝克尔:
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:10:43Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:02:01Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}我下载了postgres-operator.yml,如下所示
curl https://raw.githubusercontent.com/CrunchyData/postgres-operator/v4.6.2/installers/kubectl/postgres-operator.yml > postgres-operator.yml我拿了一本“Postgres-Operator.yml”,把“ServiceType”从“ClusterIP”改为“Nodeport”。差异如下:
[root@devk8s ~]# diff pgo.yaml postgres-operator.yml
192c192
< service_type: "NodePort"
---
> service_type: "ClusterIP"我希望“服务”以“NodePort”的形式运行。然而,尽管将ServiceType更改为“NodePort”,但它以“ClusterIP”的形式运行
[root@re-devk8s-control02 ~]# kubectl get svc postgres-operator -n pgo
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
postgres-operator ClusterIP 10.99.29.185 <none> 8443/TCP,4171/TCP,4150/TCP 9m55s我删除了名称空间并重新尝试,但是它不起作用。
请让我知道我的设置有什么问题,还是我做错了什么?
编辑:
我能够使用Postgres操作符创建集群‘河马’类型为'NodePort‘,如下所示
[root@control02 ~]# kubectl get svc -n pgo
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hippo NodePort 10.99.186.224 <none> 2022:32476/TCP,5432:31541/TCP 133m
hippo-backrest-shared-repo ClusterIP 10.100.128.186 <none> 2022/TCP 133m
postgres-operator ClusterIP 10.105.189.152 <none> 8443/TCP,4171/TCP,4150/TCP 165m我能够从worker1和worker2到K8S集群的PGO (空应答),如下所示
[root@devk8s ~]# curl 172.xx.x.1:31541
curl: (52) Empty reply from server
[root@devk8s ~]# curl 172.xx.x.2:31541
curl: (52) Empty reply from server端口在工作节点上处于侦听状态。
[root@worker02 ~]# netstat -ant | grep 31
tcp 0 0 0.0.0.0:31541 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:32476 0.0.0.0:* LISTEN但是,当我尝试点击‘172.x.x.1:31541’或‘172.x.x.2:31541’浏览器时,会说‘连接被重置’。
我不知道如何解决这个问题,也不确定“服务器的空回复”。
发布于 2021-04-23 08:50:02
您正在更改包含用于它创建的Postgres集群的选项的ConfigMap,而不是操作符本身。这项服务是给操作员的,而不是给Postgres的。继续安装并创建一个实际的Postgres集群。
https://stackoverflow.com/questions/67226571
复制相似问题