kubectl apply -f https://github.com/radondb/radondb-mysql-kubernetes/releases/latest/download/mysql_v1alpha1_mysqlcluster.yaml
Error from server (InternalError): error when creating “https://github.com/radondb/radondb-mysql-kubernetes/releases/latest/download/mysql_v1alpha1_mysqlcluster.yaml”: Internal error occurred: failed calling webhook “vmysqlcluster.kb.io”: Post “https://radondb-mysql-webhook.mem-example.svc:443/validate-mysql-radondb-com-v1alpha1-mysqlcluster?timeout=10s”: dial tcp 10.103.66.0:443: connect: no route to host
从报错信息看是连接 10.103.66.0:443 失败
1、查看svc,Endpoints地址是 10.100.0.113:9443
[root@mysql-4 ~]# k describe svc radondb-mysql-webhook -n mem-example
Name: radondb-mysql-webhook
Namespace: mem-example
Labels: app.kubernetes.io/managed-by=Helm
Annotations: meta.helm.sh/release-name: demo
meta.helm.sh/release-namespace: mem-example
Selector: app=mysql-operator
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.103.66.0
IPs: 10.103.66.0
Port: <unset> 443/TCP
TargetPort: 9443/TCP
Endpoints: 10.100.0.113:9443
Session Affinity: None
Events: <none>
2、启动一个busybox pod,
解析域名没有问题。
/ # ping radondb-mysql-webhook.mem-example.svc
PING radondb-mysql-webhook.mem-example.svc (10.103.66.0): 56 data bytes
再ping endpoint地址,也没有问题。
/ # ping 10.100.0.113
PING 10.100.0.113 (10.100.0.113): 56 data bytes
64 bytes from 10.100.0.113: seq=0 ttl=64 time=0.950 ms
64 bytes from 10.100.0.113: seq=1 ttl=64 time=0.243 ms
64 bytes from 10.100.0.113: seq=2 ttl=64 time=0.110 ms
C
--- 10.100.0.113 ping statistics —
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.110/0.434/0.950 ms
3、telnet endpoint port 不通
/ # telnet 10.100.0.113 9443
4、查看POD运行状态,也是running起来的状态
[root@mysql-4 ~]# k get pod -n mem-example
NAME READY STATUS RESTARTS AGE
demo-mysql-operator-6dc998486-ckvxz 2/2 Running 0 24m