简体   繁体   English

从内部网络为kubernetes负载均衡器分配一个IP

[英]assign kubernetes loadbalancer an ip from an internal network

I am having an aks instance running. 我正在运行aks实例。 which I assigned an virtual network to it. 我为其分配了一个虚拟网络。 So all the Node IPs in the network are good and I can reach them from within the network. 因此,网络中的所有节点IP都很好,我可以从网络内部访问它们。

Now I wonder if it is possible to create a 2nd virtual network and tell kubernetes to use it to assign public ips ? 现在我想知道是否可以创建第二个虚拟网络并告诉kubernetes使用它来分配公共ip?

Or maybe is it possible to say that a specific service should always have the same node ip ? 或者也许可以说特定服务应该始终具有相同的节点ip?

No, this is not supported, you might be able to hack your way through, but certainly not out of the box. 不,不支持此功能,您也许可以破解自己的方式,但肯定不是开箱即用的。

But you can create an internal load balancer for your service in the network and its ip wouldnt change, you do this using a service with an annotation: 但是您可以为网络中的服务创建内部负载平衡器,并且其ip不会更改,您可以使用带有注释的服务来执行此操作:

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

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

相关问题 AKS 内部负载均衡器更改 IP - AKS internal loadbalancer changing IP 负载均衡器 IP 和入口 IP 状态在 kubernetes 中处于挂起状态 - Loadbalancer IP and Ingress IP status is pending in kubernetes Azure Kubernetes - 带有 Https 服务的内部负载均衡器? - Azure Kubernetes - Internal LoadBalancer with Https Service? 无法访问 Azure kubernetes 服务负载均衡器外部 IP - Azure kubernetes service loadbalancer external IP not accessible 如何使用LoadBalancer服务从Azure Kubernetes中获取客户端IP地址 - How to get client IP address from inside a Azure Kubernetes with a LoadBalancer service 如何使用 static 外部 IP 用于 Azure ZB76E98AF9AAA680979BF5A65B2D5 - How to use static External IP for Azure kubernetes LoadBalancer? Kube.netes:AKS 上的某些服务(LoadBalancer)正在等待外部 IP - Kubernetes: External-IP is pending for some services(LoadBalancer) on AKS 如何为 Azure Kubernetes 集群创建 TCP/IP 负载均衡器/应用程序网关 - How to create TCP/IP loadbalancer/applicationgateway for Azure Kubernetes cluster 列出 Azure 内部负载均衡器和应用程序网关的前端 IP - List frontend IP of Azure Internal Loadbalancer and Application Gateway 在Azure Kubernetes上为内部IP配置HTTPS - Configuring HTTPS for an internal IP on Azure Kubernetes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM