k8s es

[root@k8s-node-01 elk-01]# kubectl get pod -n flink
NAME                                      READY   STATUS        RESTARTS         AGE
es-cluster-master-6644f585cf-ds9lf        1/1     Running       0                7s
es-cluster-master-6644f585cf-f2mgb        1/1     Running       0                7s
es-cluster-master-6644f585cf-zxkk6        1/1     Running       0                7s

[root@k8s-node-01 elk-01]# kubectl  get svc -n flink
NAME                    TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                      AGE
es-cluster-svc          ClusterIP   10.1.81.180    <none>        9300/TCP                     4m37s
es-nodeport-svc         NodePort    10.1.164.67    <none>        9200:32700/TCP               4m37s



[root@k8s-node-01 elk-01]# curl 192.168.42.131:32700/_cat/nodes
{ "error" : { "root_cause" : [ { "type" : "master_not_discovered_exception", "reason" : null } ], "type" : "master_not_discovered_exception", "reason" : null }, "status" : 503 }

#############

discovery.zen.ping.unicast.hosts=es-cluster-svc 以上错误因为指定的是 es-nodeport-svc
在这里插入图片描述

[root@k8s-node-01 elk-01]# curl localhost:32700/_cat/nodes
10.244.0.47 49 61 1 0.29 0.75 1.48 mdi - pX3L0zC
10.244.0.46 47 61 1 0.29 0.75 1.48 mdi - NydC8lX
10.244.0.48 54 61 1 0.29 0.75 1.48 mdi * 1-i7Fni
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐