[英]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等)中有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.