[英]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.