istio大坑

问题描述:

不管是 istio-egressgateway, istio-ingressgateway,istiod 任何一个pod 报错为

2024-09-14T15:06:47.983771Z	warn	sds	failed to warm certificate: failed to generate workload certificate: create certificate: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"
2024-09-14T15:07:02.146727Z	warning	envoy config external/envoy/source/extensions/config_subscription/grpc/grpc_stream.h:214	DeltaAggregatedResources gRPC config stream to xds-grpc closed since 72s ago: 14, connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"	thread=14
2024-09-14T15:07:08.605160Z	warning	envoy config external/envoy/source/extensions/config_subscription/grpc/grpc_stream.h:214	DeltaAggregatedResources gRPC config stream to xds-grpc closed since 79s ago: 14, connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"	thread=14
2024-09-14T15:07:14.718075Z	warn	ca	ca request failed, starting attempt 1 in 101.523463ms
2024-09-14T15:07:14.820519Z	warn	ca	ca request failed, starting attempt 2 in 217.118867ms
2024-09-14T15:07:15.037962Z	warn	ca	ca request failed, starting attempt 3 in 403.499234ms
2024-09-14T15:07:15.442603Z	warn	ca	ca request failed, starting attempt 4 in 814.549091ms
2024-09-14T15:07:16.257417Z	error	citadelclient	failed to sign CSR: create certificate: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"
2024-09-14T15:07:16.257658Z	info	citadelclient	recreated connection
2024-09-14T15:07:16.257680Z	error	cache	resource:default failed to sign: create certificate: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"
2024-09-14T15:07:16.257684Z	warn	sds	failed to warm certificate: failed to generate workload certificate: create certificate: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"
2024-09-14T15:07:32.923602Z	warning	envoy config external/envoy/source/extensions/config_subscription/grpc/grpc_stream.h:214	DeltaAggregatedResources gRPC config stream to xds-grpc closed since 103s ago: 14, connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"	thread=14
2024-09-14T15:07:41.032873Z	warning	envoy config external/envoy/source/extensions/config_subscription/grpc/grpc_stream.h:214	DeltaAggregatedResources gRPC config stream to xds-grpc closed since 111s ago: 14, connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"	thread=14
2024-09-14T15:07:50.099643Z	warn	ca	ca request failed, starting attempt 1 in 90.021374ms
2024-09-14T15:07:50.190024Z	warn	ca	ca request failed, starting attempt 2 in 205.565755ms
2024-09-14T15:07:50.396471Z	warn	ca	ca request failed, starting attempt 3 in 366.428367ms
2024-09-14T15:07:50.763131Z	warn	ca	ca request failed, starting attempt 4 in 735.476917ms
2024-09-14T15:07:51.499468Z	error	citadelclient	failed to sign CSR: create certificate: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"
2024-09-14T15:07:51.499958Z	info	citadelclient	recreated connection
2024-09-14T15:07:51.500027Z	error	cache	resource:default failed to sign: create certificate: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"
2024-09-14T15:07:51.500033Z	warn	sds	failed to warm certificate: failed to generate workload certificate: create certificate: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"
2024-09-14T15:08:09.426727Z	warning	envoy config external/envoy/source/extensions/config_subscription/grpc/grpc_stream.h:214	DeltaAggregatedResources gRPC config stream to xds-grpc closed since 140s ago: 14, connection error: desc = "transport: Error while dialing: dial tcp: lookup istiod.istio-system.svc on 114.114.114.114:53: no such host"	thread=14```

等等 类似的

准备

·``bash

下载istio的包
https://github.com/istio/istio/releases/
wget https://github.com/istio/istio/releases/download/1.23.1/istio-1.23.1-linux-amd64.tar.gz
tar -xf istio-1.23.1-linux-amd64.tar.gz

istioctl install --set profile=demo --set values.pilot.env.PILOT_ENABLE_ALPHA_GATEWAY_API=true -y


## 遇到最坑的问题就是

```bash
ingress-nginx   ingress-nginx-controller-547cb74f56-lm2jk  0/1   
istio-system    istio-egressgateway-5dffc78f8b-czsjw        0/1       
istio-system    istio-ingressgateway-64d56dc854-pflg8   1 /1   

报错
三个报错都差不多 排查了好久 其实就是自己的 coredns 是二进制装的 没有配好默认dns
在这里插入图片描述

解决

在kubelet加上配置
–cluster-dns=10.0.0.2 \ 自己的coredns
–cluster_domain=cluster.local \

[Unit]
Description=Kubernetes Kubelet
Documentation=https://github.com/kubernetes/kubernetes
After=docker.service
Requires=docker.service

[Service]
WorkingDirectory=/data/kubernetes/kubelet
ExecStart=/data/kubernetes/kubernetes/server/bin/kubelet \
  --bootstrap-kubeconfig=/data/SSL/k8s/kubelet-bootstrap.kubeconfig \
  --cluster-dns=10.0.0.2 \
  --cluster_domain=cluster.local \
  --cert-dir=/data/SSL/k8s \
  --kubeconfig=/data/kubernetes/cfg/kubelet.kubeconfig \
  --config=/data/SSL/k8s/kubelet.json \
  --container-runtime-endpoint=unix:///run/containerd/containerd.sock \
  --pod-infra-container-image=registry.aliyuncs.com/google_containers/pause:3.2 \
  --root-dir=/etc/cni/net.d \
  --node-labels=node.kubernetes.io/node= \
  --v=2
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

解决

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值