【TiDB 使用环境】测试
【TiDB 版本】v8.5.1;
Kubernetes Version: v1.33.1
pingcap/tidb-operator v1.6.1
【部署方式】在self-host的 Kubernetes 中使用 TiDB Operator 部署 TiDB
【遇到的问题:问题现象及影响】
部署完成后所有的Pod状态都是绿色的,但是看到大量持续更新的警告,基本上每35s就会告警一次:
IPAddress: 10.97.69.217 for Service tidb-test/basic-discovery has a wrong reference; cleaning up
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Namespace
metadata:
name: tidb-test
---
apiVersion: pingcap.com/v1alpha1
kind: TidbCluster
metadata:
name: basic
namespace: tidb-test
spec:
version: v8.5.1
timezone: UTC
pvReclaimPolicy: Retain
enableDynamicConfiguration: true
configUpdateStrategy: RollingUpdate
discovery: {}
helper:
image: alpine:3.16.0
pd:
baseImage: pingcap/pd
maxFailoverCount: 0
replicas: 3
storageClassName: local-path
requests:
storage: "10Gi"
config: {}
tikv:
baseImage: pingcap/tikv
maxFailoverCount: 0
evictLeaderTimeout: 1m
replicas: 3
storageClassName: local-path
requests:
storage: "50Gi"
config: {}
tidb:
baseImage: pingcap/tidb
maxFailoverCount: 0
replicas: 3
service:
type: ClusterIP
config: {}
storageClassName: local-path
# With the default configuration, I encountered frequent 'dial tcp: lookup basic-tidb-0.basic-tidb-peer.tidb-test.svc
# on 10.96.0.10:53: no such host' errors, despite internal domain names being resolvable via nslookup. TiDB containers
# (pingcap/pd) use BusyBox with musl, where the DNS resolver behaves differently from nslookup. Kubernetes sets
# 'options ndots:5' in /etc/resolv.conf on nodes by default, which can cause issues for TiDB components.
# To resolve this, I overridden the ndots option to 4.
dnsConfig:
options:
- name: ndots
value: "4"
EOF
一切运行正常,Pod 状态为绿色,服务也很稳定,但这些频繁的警告信息太多,导致无法在生产环境中使用 TiDB。
附件截图: