首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Azure ML Kubernetes -私有IP

Azure ML Kubernetes -私有IP
EN

Stack Overflow用户
提问于 2021-03-12 22:13:01
回答 1查看 123关注 0票数 1

我在VNET/Subnet中有一个AKS集群。我的AKS链接到AzureML。

我成功地将Azure ML服务部署到该AKS。

但是,我看到azureml-fe服务响应的是一个公共IP,而不是来自我的VNET/Subnet的私有IP。

如何才能使我的AzureML推理服务公开内网IP?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-15 14:37:57

也许你需要使用一个内部负载均衡器,然后它会使用一个内网IP地址。Here是Python的示例代码:

代码语言:javascript
运行
复制
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)
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66601526

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档