如何使用 Azure CLI 配置 "Kubernetes KMS plugin for Azure Key Vault"?

How to configure "Kubernetes KMS plugin for Azure Key Vault" with Azure CLI?

我正在 Azure 上使用 Kubernetes。我创建并配置了 Azure Kubernetes Service and Azure Container Registry with the Azure command line interface (CLI) - 我有一个充满 Azure CLI bash 脚本的存储库,create/destroy 我的云基础设施。

我计划使用 Helm. I plan to use Helm Secrets to encrypt secrets and I am hoping I can use Azure Key Vault 部署到 Kubernetes 以存储 encrypt/decrypt "secrets" 的加密密钥。

我现在正在尝试创建和配置 Azure Key Vault 以使用 Azure Kubernetes 服务。我可以看到如何使用 Azure CLI 创建 Key Vault,但是 kubernetes-kms 的文档建议如果您以某种方式配置 Kubernetes,那么 Key Vault 将自动创建,并且将配置为与 Azure Kubernetes 通信服务。

"We have added this feature to aks-engine so that you do not have to worry about any of the manual steps to set this up."

The documentation talks about editing a "kubernetesConfig",我还没有在任何地方看到 "kubernetesConfig" - 我想如果你使用 Azure 创建你的组件,你会得到这样的结果资源管理器 (ARM) 模板。

如何使用 Azure CLI 让 Azure Key Vault 与 kubernetes-kms 一起工作?

例如添加 enableEncryptionWithExternalKms 到 Kubernetes 配置并添加 objectId 属性到服务主体。

你不能用 AKS 做到这一点。您无权访问 masters 来配置它们。