我可以在多个 AKS 群集中使用我的 azure DNS 区域吗

Can I use my azure DNS zone in more than one AKS clusters

我的域名有 DNS 区域,还有一个 AKS 群集。我想创建具有两个独立集群的开发和暂存环境。所以我想在每个集群中使用具有不同子域的相同域并将其集成到入口中。

如果我没理解错的话,你需要 Exposing Applications on Azure.

所以思路是用External DNS + nginx ingress controller。 你

az group create -n devresourcegroup -l yourlocation
az network dns zone create -g devresourcegroup -n dev.yourdomainname.com

az group create -n stagingresourcegroup -l yourlocation
az network dns zone create -g stagingresourcegroup -n staging.yourdomainname.com

假设 external-dns-values.yaml应该像

dev-external-dns-values.yaml:

domainFilters:
  - dev.yourdomainname.com          # (optional) Just restrict to this                     
...
azure:
  secretName: azure-config-file     # Secret name created above for dev
extraArgs:
  azure-resource-group: devresourcegroup  # (Optional) Resource group name created above

staging-external-dns-values.yaml:

domainFilters:
  - staging.yourdomainname.com     # (optional) Just restrict to this domain
...                 
azure:
  secretName: azure-config-file     # Secret name created above for staging
extraArgs:
  azure-resource-group: stagingresourcegroup  # (Optional) Resource group name created above
helm install stable/external-dns --name external-dns -f dev-external-dns-values.yaml
helm install stable/external-dns --name external-dns -f staging-external-dns-values.yaml
spec:
  rules:
  - host: 
    http:
      paths:
      - backend:
          serviceName: 
          servicePort: 
        path: