Jeff
[root@k8s-master01 user1]# kubectl -n kubesphere-system exec -it ks-console-f69f5dd5c-xwlks nslookup redis.kubesphere-system.svc
nslookup: can't resolve '(null)': Name does not resolve
Name: redis.kubesphere-system.svc
Address 1: 10.232.54.198 redis.kubesphere-system.svc.cluster.local
[root@k8s-master01 user1]# kubectl -n kubesphere-system get svc -o wide
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
ks-apiserver ClusterIP 10.232.3.53 <none> 80/TCP 4d13h app=ks-apiserver,tier=backend,version=v3.0.0
ks-console NodePort 10.232.30.221 <none> 80:30880/TCP 4d13h app=ks-console,tier=frontend,version=v3.0.0
ks-controller-manager ClusterIP 10.232.34.241 <none> 443/TCP 4d13h app=ks-controller-manager,tier=backend,version=v3.0.0
openldap ClusterIP None <none> 389/TCP 4d13h app.kubernetes.io/instance=ks-openldap,app.kubernetes.io/name=openldap-ha
redis ClusterIP 10.232.54.198 <none> 6379/TCP 4d13h app=redis-ha-haproxy,release=ks-redis
redis-ha ClusterIP None <none> 6379/TCP,26379/TCP 4d13h app=redis-ha,release=ks-redis
redis-ha-announce-0 ClusterIP 10.232.56.38 <none> 6379/TCP,26379/TCP 4d13h app=redis-ha,release=ks-redis,statefulset.kubernetes.io/pod-name=redis-ha-server-0
redis-ha-announce-1 ClusterIP 10.232.34.176 <none> 6379/TCP,26379/TCP 4d13h app=redis-ha,release=ks-redis,statefulset.kubernetes.io/pod-name=redis-ha-server-1
redis-ha-announce-2 ClusterIP 10.232.10.25 <none> 6379/TCP,26379/TCP 4d13h app=redis-ha,release=ks-redis,statefulset.kubernetes.io/pod-name=redis-ha-server-2
[root@k8s-master01 user1]# kubectl -n kubesphere-system exec -it redis-ha-server-0 -- sh -c 'for i in `seq 0 2`; do nc -vz redis-ha-server-$i.redis-ha.kubesphere-system.svc 6379; done'
Defaulting container name to redis.
Use 'kubectl describe pod/redis-ha-server-0 -n kubesphere-system' to see all of the containers in this pod.
redis-ha-server-0.redis-ha.kubesphere-system.svc (10.232.113.17:6379) open
redis-ha-server-1.redis-ha.kubesphere-system.svc (10.232.76.21:6379) open
redis-ha-server-2.redis-ha.kubesphere-system.svc (10.232.66.17:6379) open