0

我在 Azure ML 工作区中运行了 ml 代码。使用 Azure MLops 管道通过推理集群部署 Aks 集群部署的 vnet 相同的代码。创建密钥库是为了存储在 jupyter notebook 中访问的变量

While testing the endpoint from Postman getting "managedidentitycredential.get_token failed: managedidentitycredential authentication unavailable, no managed identity endpoint found" error.

In code, trying to access key-vault variables by the below method.
credentials = DefaultAzureCredential()
client = SecretClient(vault_url="url", credential=credentials)
access_key = client.get_secret("KEY").value

Please help, how to access key vault here? 

Thanks.
4

1 回答 1

0

请参阅此示例中的“在远程运行中使用机密”部分以访问 Key Vault。

https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/manage-azureml-service/authentication-in-azureml/authentication-in-azureml.ipynb

使用 Azure 门户为 VM 上的 Azure 资源配置托管标识: https ://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-虚拟机

于 2021-07-15T19:19:04.743 回答