【问题标题】:do not get public ip while creating service load balancer创建服务负载均衡器时不要获取公共 IP
【发布时间】:2021-05-17 04:37:22
【问题描述】:

您好,我从头到尾一直关注this video。使用kubectl describe 显示已创建的服务产量

$ kubectl describe -n ingress-nginx service/ingress-nginx
Name:                     ingress-nginx
Namespace:                ingress-nginx
Labels:                   <none>
Annotations:              <none>
Selector:                 app=nginx-ingress
Type:                     LoadBalancer
IP:                       10.110.231.177
LoadBalancer Ingress:     localhost
Port:                     http  80/TCP
TargetPort:               http/TCP
NodePort:                 http  32352/TCP
Endpoints:                10.1.0.12:80,10.1.0.13:80
Port:                     https  443/TCP
TargetPort:               https/TCP
NodePort:                 https  30563/TCP
Endpoints:                10.1.0.12:443,10.1.0.13:443
Session Affinity:         None
External Traffic Policy:  Local
HealthCheck NodePort:     30574
Events:                   <none>

为什么我没有得到视频作者解释的公共 IP 地址?这就是我无法访问链接http://marcel.test的原因吗?

此外,在 AWS 上进行相同设置时,外部 IP 保持在 Pending 以用于 LoadBalancer 服务。

【问题讨论】:

    标签: kubernetes nginx-ingress docker-for-windows docker-desktop


    【解决方案1】:

    我使用的主机文件不正确,因为我使用 git bash 我 vim 进入 /etc/hosts 但实际上 Windows 中的主机文件是 C:\Windows\System32\drivers\etc 所以我用 127.0.0.1 marcel.test 更新了主机文件工作过

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-16
      • 2018-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-22
      • 1970-01-01
      • 2018-12-27
      相关资源
      最近更新 更多