无法从internet访问Azure kubernetes负载平衡器外部ip

无法从internet访问Azure kubernetes负载平衡器外部ip,kubernetes,kubernetes-ingress,kubernetes-service,Kubernetes,Kubernetes Ingress,Kubernetes Service,我创建了一个带有多节点池的K8s集群,因为我需要使用windows容器。windows节点池有1个节点。我已经创建了部署和负载平衡器类型的服务,它在部署时获得了外部IP。但当我从笔记本电脑ping外部IP时,我收到一个超时请求。我有一些WCF微服务需要访问windows容器中部署的服务,反之亦然。由于我无法从我的机器ping负载平衡器IP,我怀疑WCF微服务也会。我无法从运行这些外部微服务的Azure VM ping此外部IP。 我们可以从internet ping分配给K8s负载平衡器的外部I

我创建了一个带有多节点池的K8s集群,因为我需要使用windows容器。windows节点池有1个节点。我已经创建了部署和负载平衡器类型的服务,它在部署时获得了外部IP。但当我从笔记本电脑ping外部IP时,我收到一个超时请求。我有一些WCF微服务需要访问windows容器中部署的服务,反之亦然。由于我无法从我的机器ping负载平衡器IP,我怀疑WCF微服务也会。我无法从运行这些外部微服务的Azure VM ping此外部IP。 我们可以从internet ping分配给K8s负载平衡器的外部IP吗。如果是,我是否需要对群集或Vnet/子网进行其他配置更改

我还创建了一个公共静态IP并分配给服务yaml。我还将这个静态IP作为环境变量传递到部署文件中,以便其他WCF微服务知道需要与之通信的IP地址

PS Azure:\> kubectl get service myservice --watch
NAME                TYPE           CLUSTER-IP   EXTERNAL-IP      PORT(S)                                                                         AGE
myservice   LoadBalancer   10.0.0.50    20.185.104.254   9163:30733/TCP,23010:30526/TCP   2d8h

检查入站防火墙规则。很可能您已阻止了入站流量

PS Azure:\> kubectl describe service myservice
Name:                     myservice
Namespace:                default
Labels:                   app=myservice
Annotations:              kubectl.kubernetes.io/last-applied-configuration:
                            {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"myservice"},"name":"myservice","namespac...
Selector:                 app=myservice
Type:                     LoadBalancer
IP:                       10.0.0.50
LoadBalancer Ingress:     20.185.104.254
Port:                     svcproxy  9163/TCP
TargetPort:               9163/TCP
NodePort:                 svcproxy  30733/TCP
Endpoints:                <none>
Port:                     banyan  23010/TCP
TargetPort:               23010/TCP
NodePort:                 banyan  30526/TCP
Endpoints:                <none>
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>
Azure:/
C:\windows\system32>ping 20.185.104.254

Pinging 20.185.104.254 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 20.185.104.254:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)