【发布时间】:2022-08-24 20:48:04
【问题描述】:
我的服务定义如下
# SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
apiVersion: v1
kind: Service
metadata:
name: frontend
labels:
app: guestbook
tier: frontend
spec:
# if your cluster supports it, uncomment the following to automatically create
# an external load-balanced IP for the frontend service.
# type: LoadBalancer
type: LoadBalancer
#type: NodePort
ports:
# the port that this service should serve on
- targetPort: 80
port: 80
selector:
app: guestbook
tier: frontend
应用后
我期望得到外部 IP,如 here 所解释的那样,但相反,它仍然处于待处理状态并且不会改变,如下所示 你能帮我找出为什么我没有得到EXTERNAL-IP吗?谢谢
-
这外部IP列可能会显示<待定>而负载均衡器正在创建。创建负载均衡器可能需要几分钟时间。你能运行kubectl 获取现在命令并检查。
-
这是它永远保持这种状态的问题。
-
LoadBalancer 类型的服务可以通过 minikube tunnel 命令公开。它必须在单独的终端窗口中运行以保持 LoadBalancer 运行。欲了解更多信息,请参阅link
-
你有没有尝试过minikube隧道?
标签: kubernetes kubectl minikube