简体   繁体   English

Kubernetes无法在Azure上创建负载均衡器

[英]Kubernetes fails to create loadbalancer on azure

We have created the kubernetes cluster on the azure VM, with Kube master and two nodes. 我们在azure VM上创建了kubernetes集群,其中包含Kube master和两个节点。 We have deployed application and created the service with "NodePort" which works well. 我们已经部署了应用程序,并使用“ NodePort”创建了运行良好的服务。 But when we try to use the type: LoadBalancer then it create service but the external IP goes pending state. 但是,当我们尝试使用类型:LoadBalancer时,它会创建服务,但外部IP会变为挂起状态。 Currently we unable create service type load balance and due this "ingress" nginx controller also going to same state. 当前,我们无法创建服务类型的负载平衡,并且由于此“入口” nginx控制器也将进入相同状态。 So we are not sure how do we setup load balancing in this case. 因此,我们不确定在这种情况下如何设置负载平衡。

We have tried creating Load Balancer in Azure and trying to use that ip like shown below in service. 我们尝试在Azure中创建Load Balancer,并尝试使用该IP,如下所示。

kind: Service
apiVersion: v1
metadata:
  name: jira-service
  labels:
    app: jira-software
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
spec:
  selector:
    app: jira-software
  type: LoadBalancer
  loadBalancerIP: xxx.xxx.xxx.xxx
  ports:
  - name: jira-http
    port: 8080
    targetPort: jira-http

similarly we have one more application running on this kube cluster and we want to access application based on the context path. 类似地,我们在此kube集群上运行了另一个应用程序,我们希望基于上下文路径访问应用程序。 if we invoke jira it should call backend server jira http://dns-name/jira if we invoke some other app like bitbucket http://dns-name/bitbukcet 如果我们调用jira,则应调用后端服务器jira http://dns-name/jira如果我们调用其他应用程序,例如bitbucket http://dns-name/bitbukcet

If I understand correctly you used type LoadBalancer in Virtual Machine, which will not work - type LoadBalancer works only in managed Kubernetes services like GKE, AKS etc. 如果我正确理解,您在虚拟机中使用了LoadBalancer类型,将无法正常工作-类型LoadBalancer仅在托管的Kubernetes服务(例如GKE,AKS等)中有效。

You can find more information here . 您可以在此处找到更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为 Azure Kubernetes 集群创建 TCP/IP 负载均衡器/应用程序网关 - How to create TCP/IP loadbalancer/applicationgateway for Azure Kubernetes cluster 如何在Azure中为Kubernetes Ingress控制器创建负载均衡器(IAAS) - How to create loadbalancer (IAAS) in Azure for Kubernetes Ingress controller Azure Kubernetes - 带有 Https 服务的内部负载均衡器? - Azure Kubernetes - Internal LoadBalancer with Https Service? 无法访问 Azure kubernetes 服务负载均衡器外部 IP - Azure kubernetes service loadbalancer external IP not accessible Azure Kubernetes LoadBalancer 将请求转发到所有实例 - Azure Kubernetes LoadBalancer forward requests to all instances 在Azure中使用vnet创建负载均衡器 - Create loadbalancer inside a vnet with azure 如何使用 static 外部 IP 用于 Azure ZB76E98AF9AAA680979BF5A65B2D5 - How to use static External IP for Azure kubernetes LoadBalancer? 在Azure中创建Kubernetes集群失败 - Creating a Kubernetes cluster in Azure fails 在 Azure 中创建 kubernetes LoadBalancer 服务时,如何避免/控制默认安全组规则的创建? - How to avoid/control creation of default security group rule when creating kubernetes LoadBalancer service in Azure? 如何使用LoadBalancer服务从Azure Kubernetes中获取客户端IP地址 - How to get client IP address from inside a Azure Kubernetes with a LoadBalancer service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM