【发布时间】:2021-01-12 08:30:57
【问题描述】:
我已经使用 kubespray 2.13.2 在 Azure 上安装了一个 kubernetes 集群。
但是在我安装了一些数据平台组件的 pod 之后,
我注意到在同一节点上运行的 pod 无法通过服务相互访问。
例如,我的 presto 协调器必须访问 hive 元存储。 让我们看看我的命名空间中的服务:
kubectl get svc -n ai-developer
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
metastore ClusterIP 10.233.12.66 <none> 9083/TCP 4h53m
Hive Metastore 服务称为metastore,我的 presto 协调器必须通过它访问 hive Metastore pod。
让我们看看我的命名空间中的以下 pod:
kubectl get po -n ai-developer -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
metastore-5544f95b6b-cqmkx 1/1 Running 0 9h 10.233.69.20 minion-3 <none> <none>
presto-coordinator-796c4c7bcd-7lngs 1/1 Running 0 5h32m 10.233.69.29 minion-3 <none> <none>
presto-worker-0 1/1 Running 0 5h32m 10.233.67.52 minion-1 <none> <none>
presto-worker-1 1/1 Running 0 5h32m 10.233.70.24 minion-4 <none> <none>
presto-worker-2 1/1 Running 0 5h31m 10.233.68.24 minion-2 <none> <none>
presto-worker-3 1/1 Running 0 5h31m 10.233.71.27 minion-0 <none> <none>
查看 hive Metastore pod metastore-5544f95b6b-cqmkx ,它在节点 minion-3 上运行,presto 协调器 pod presto-coordinator-796c4c7bcd-7lngs 也在其上运行。
我已将 thrift://metastore:9083 的配置单元元存储 url 配置为 presto 协调器中配置单元目录的配置单元属性。
当 presto pod 在运行 hive metastore pod 的同一节点上运行时,它们无法访问我的 hive metastore,但是在 hive metastore 未运行的其他节点上运行的 pod 可以通过service 很好地访问 hive metastore .
我只提到了一个例子,但我现在还经历过其他几个类似这个例子的案例。
kubenet 作为网络插件安装在我的 kubernetes 集群中,在 azure 上安装了 kubespray:
/usr/local/bin/kubelet --logtostderr=true --v=2 --node-ip=10.240.0.4 --hostname-override=minion-3 --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config=/etc/kubernetes/kubelet-config.yaml --kubeconfig=/etc/kubernetes/kubelet.conf --pod-infra-container-image=k8s.gcr.io/pause:3.1 --runtime-cgroups=/systemd/system.slice --hairpin-mode=promiscuous-bridge --network-plugin=kubenet --cloud-provider=azure --cloud-config=/etc/kubernetes/cloud_config
有什么想法吗?
【问题讨论】:
标签: kubernetes