【发布时间】:2020-02-25 04:26:17
【问题描述】:
我的目标是在 Kubernetes 集群上进行简单的 Istio 设置。我能够在我的笔记本电脑上使用 Docker Desktop 来实现这一点。
下一步,考虑在我公司内部数据中心的 CentOS 虚拟机上托管的 Kubernetes 集群上执行此操作。我有一个简单的 Kubernetes 集群设置,并且能够在那里部署一些示例服务。然后我设置了 Istio 并使用 istio-injection=enabled 创建了一个新的命名空间。当我尝试在新命名空间中部署服务时,出现以下错误。
> Error creating: Internal error occurred: failed calling webhook
> "sidecar-injector.istio.io": Post
> https://istio-sidecar-injector.istio-system.svc:443/inject?timeout=30s:
> dial tcp 10.109.98.58:443: connect: no route to host
我不确定我做错了什么,或者我是否缺少任何配置。
任何帮助或指点将不胜感激。
下面是kubectl get pods --all-namespaces的输出
NAMESPACE NAME READY STATUS RESTARTS AGE
istio-system grafana-6c8f45499-hv4tq 1/1 Running 0 10d
istio-system istio-citadel-db8578cc4-bsdcj 1/1 Running 0 10d
istio-system istio-egressgateway-f9c7b6669-h9tvh 0/1 Running 0 10d
istio-system istio-galley-786ff7f89b-42snm 1/1 Running 0 10d
istio-system istio-ingressgateway-5654f8bf65-6bg7n 0/1 Running 0 10d
istio-system istio-pilot-c565b478c-j4f8c 0/1 Running 0 10d
istio-system istio-policy-7d5f97776c-n4c96 0/1 CrashLoopBackOff 5031 10d
istio-system istio-sidecar-injector-c7ff9dd99-wh9nf 1/1 Running 0 14h
istio-system istio-telemetry-55dd49cf85-f26hp 0/1 CrashLoopBackOff 5117 10d
istio-system istio-tracing-78548677bc-zqz5j 1/1 Running 0 10d
istio-system kiali-fb5f485fb-ll6bz 1/1 Running 0 10d
istio-system prometheus-685585888b-rwl2r 1/1 Running 0 10d
kube-system coredns-5d4dd4b4db-cj927 1/1 Running 0 11d
kube-system coredns-5d4dd4b4db-kwcqf 1/1 Running 0 11d
kube-system etcd-master-node 1/1 Running 0 11d
kube-system kube-apiserver-master-node 1/1 Running 0 11d
kube-system kube-controller-manager-master-node 1/1 Running 0 11d
kube-system kube-proxy-49qdq 1/1 Running 0 11d
kube-system kube-proxy-h2p7c 1/1 Running 1 10d
kube-system kube-proxy-ncwnx 1/1 Running 1 10d
kube-system kube-scheduler-master-node 1/1 Running 0 11d
kube-system weave-net-67r6x 2/2 Running 0 11d
kube-system weave-net-kxvbc 2/2 Running 2 10d
kube-system weave-net-spv99 2/2 Running 3 10d
执行kubectl --v=9 apply -f https://raw.githubusercontent.com/istio/istio/release-1.4/samples/bookinfo/networking/bookinfo-gateway.yaml的日志可查看here(太大了,贴在帖子上)。
谢谢。
PS:我之前使用过服务这个词。
-Anoop
【问题讨论】:
-
您所有的 istio pod 都已启动并运行,尤其是 istio-sidecar-injector?你的 istio 和 kubernetes 版本是什么?你用什么CNI? centos的版本是多少?你使用什么负载均衡器?
-
所有 istio pod,除了 policy 和 telemtry,都已启动并运行,但无法连接到厨房并出现以下错误。 kubernetes的版本是1.15.9,istio是1.4.4,OS是CentOS 7,CNI是weave
2020-02-20T12:56:39.493311Z info grpc: addrConn.createTransport failed to connect to {istio-galley.istio-system.svc:9901 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial tcp: lookup istio-galley.istio-system.svc on 10.96.0.10:53: read udp 190.168.1.6:58901->10.96.0.10:53: read: connection refused". Reconnecting... -
您是如何创建集群的?是 kubeadm 吗?对 api 平面的请求适用于 GET 请求,但 POST 请求在 30 秒超时后得到错误 500。我会说这是编织或负载平衡器的问题,请您添加
kubectl get pods --all-namespaces,以便我可以实际查看集群是否健康?您是否有机会将 weave 更改为另一个 CNI,例如 calico,然后尝试安装 istio?你有代理服务器吗? -
您可以试试
kubectl --v=9 apply -f https://raw.githubusercontent.com/istio/istio/release-1.4/samples/bookinfo/networking/bookinfo-gateway.yaml并将输出添加到您的帖子中吗? -
@jt97,集群是用 kubeadm 创建的。我没有将编织更改为另一个 CNI 的选项。已使用您要求的上述两个命令的输出更新了帖子。
标签: kubernetes istio