尝试转发了 elasticsearc ,集群外已经能请求是通的,但是服务不可用
kubectl port-forward -n debug svc/elasticsearch 32345:9200 --address 0.0.0.0 # 集群外浏览器访问时,命令行报以下错:
Forwarding from 0.0.0.0:32345 -> 9200
Handling connection for 32345
E1109 20:49:19.449246 2732386 portforward.go:400] an error occurred forwarding 32345 -> 9200: error forwarding port 9200 to pod 363e34776981b5357de40b6139fd9ee2c978a05eebd1a5f7932b7bf3868930f2, uid : exit status
1: 2022/11/09 20:49:19 socat[541516] E connect(5, AF=2 127.0.0.1:9200, 16): Connection refused
但我用:kubect expose svc -n debug elasticsearch --name elasticsearch-svc --type=NodePort 后,集群外浏览器能正常访问 es 的版本页面
请问下大家这是咋回事啊, 是这么用的吗
@
Judoon @
yasi @
MrSheng @
ospider