【问题标题】:Can I use my azure DNS zone in more than one AKS clusters [closed]我可以在多个 AKS 群集中使用我的 Azure DNS 区域吗?
【发布时间】:2022-02-02 18:31:06
【问题描述】:

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

【问题讨论】:

    标签: azure kubernetes dns azure-aks azure-dns


    【解决方案1】:

    如果我理解正确,您需要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: 
    

    【讨论】:

      猜你喜欢
      • 2019-09-26
      • 1970-01-01
      • 2019-04-09
      • 1970-01-01
      • 1970-01-01
      • 2021-04-12
      • 2020-03-30
      • 2021-08-01
      • 1970-01-01
      相关资源
      最近更新 更多