【问题标题】:Istio in AKS with DNSAKS 中的 Istio 与 DNS
【发布时间】:2019-07-24 18:11:39
【问题描述】:

我将来自 Istio 的 book 应用程序部署在具有负载均衡器和自定义域的 AKS 集群中。这是gateway.yaml

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: bookinfo-gateway
spec:
  selector:
    istio: ingressgateway # use istio default controller
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - "x.myaks.domain"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bookinfo
spec:
  hosts:
  - "x.myaks.domain"
  gateways:
  - bookinfo-gateway
  http:
  - match:
    - uri:
        exact: /productpage
    - uri:
        prefix: /static
    - uri:
        exact: /login
    - uri:
        exact: /logout
    - uri:
        prefix: /api/v1/products
    route:
    - destination:
        host: productpage
        port:
          number: 9080

问题是,当我在浏览器中导航到 x.myaks.domain/productpage 时,我收到一个 DNS 未解析错误。有谁知道如何在域下的 AKS 集群中使用 Istio 公开服务?

curl -H "Host: x.myaks.domain" loadbalancerip/productpage 完美运行

更新

我只知道在定义 Ingress 资源时会在 Azure 中创建一个自动 DNS 条目。

  1. 是否可以将 istio 与 Ingress 资源一起使用?
  2. 如果不是,如何保护 istio envoy 代理和 nginx 入口控制器之间的数据?

【问题讨论】:

标签: kubernetes istio


【解决方案1】:

对于入口对象,ExternalDNS 将根据为入口对象指定的主机创建 DNS 记录。

对于服务ExternalDNS会在服务上寻找注解external-dns.alpha.kubernetes.io/hostname并使用对应的值。

【讨论】:

    猜你喜欢
    • 2022-01-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-07
    • 2021-09-06
    • 2019-12-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多