我在VNET/Subnet中有一个AKS集群。我的AKS链接到AzureML。
我成功地将Azure ML服务部署到该AKS。
但是,我看到azureml-fe服务响应的是一个公共IP,而不是来自我的VNET/Subnet的私有IP。
如何才能使我的AzureML推理服务公开内网IP?
发布于 2021-03-15 14:37:57
也许你需要使用一个内部负载均衡器,然后它会使用一个内网IP地址。Here是Python的示例代码:
from azureml.core.compute.aks import AksUpdateConfiguration
from azureml.core.compute import AksCompute, ComputeTarget
# When you create an AKS cluster, you can specify Internal Load Balancer to be created with provisioning_config object
provisioning_config = AksCompute.provisioning_configuration(load_balancer_type = 'InternalLoadBalancer')
# when you attach an AKS cluster, you can update the cluster to use internal load balancer after attach
aks_target = AksCompute(ws,"myaks")
# Change to the name of the subnet that contains AKS
subnet_name = "default"
# Update AKS configuration to use an internal load balancer
update_config = AksUpdateConfiguration(None, "InternalLoadBalancer", subnet_name)
aks_target.update(update_config)
# Wait for the operation to complete
aks_target.wait_for_completion(show_output = True)https://stackoverflow.com/questions/66601526
复制相似问题