From this Stack Overflow answer我知道,可以执行SRV查找来获取kubernetes服务的端口。但是我该如何执行呢?如何将其放入yml文件中?当我做NSlookup
/ # nslookup _main._tcp.account-service -type=srv
Server: 10.96.0.10
Address: 10.96.0.10#53
Non-authoritative answer:
_main._tcp.account-service.default.svc.cluster.local canonical name = account-service.default.svc.cluster.local.
Name: account-service.default.svc.cluster.local
Address: 10.103.238.155
我也看不到端口。主端口指向8082 btw。