我对库伯尼特斯是新手。我已经搜索到你可以使用 LoadBalancer NodePort https://kubernetes.io/docs/tutorials/
LoadBalancer
NodePort
我可以公开服务 负载平衡器 但不是 这是我使用的命令。
负载平衡器
kubectl expose deployment/kubernetes-bootcamp --type="NodePort" --port 8080
我想你是在特别关注 'Use a Service to Access an Application in a Cluster'
只需在回答中指出您在评论中已经得出的结论,您没有设置 --port 上的参数 expose 在这个例子中 run 跑 命令,但不是在中暴露在外部的端口 暴露
--port
expose
run
跑
暴露