通过Istio Gateway / VirtualService公开开源Helm图表

时间:2018-11-13 11:48:31

标签: kubernetes istio kubernetes-helm

我想通过Istio入口公开一些头盔图表。

例如,今天,我可以通过WScript.Shell.Windows类型(使用NginX Ingress)公开Kubernetes仪表板: Ingress

但是,对于Istio,我是否必须派发 Kubernetes仪表盘头盔图表来添加所需的 helm install stable/kubernetes-dashboard --set ingress.enabled=true Gateway yaml?

还是有更好的方法来修补开源图表以与Istio入口一起使用?

2 个答案:

答案 0 :(得分:2)

您可以创建自己的图表,其中将order_no,pickup_city,Flag 1,city_a,Same_City 1,city_a,Same_City 2,city_b,Different_City 2,city_c,Different_City 作为依赖项包含在stable/kubernetes-dashboard中。然后,您将有效地获得一个包含仪表板的包装表,并且可以在包装器级别包含Istio入口配置。

答案 1 :(得分:0)

实际上,您无需包装即可执行此操作。就我而言,我不得不将Keycloak公开为VirtualService。另外,keycloak位于其他命名空间中。

  1. 我写了Gateway

apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: keycloak-gateway namespace: keycloak spec: selector: istio: ingressgateway # use Istio default gateway implementation servers: - port: number: 80 name: http protocol: HTTP hosts: - "*"

  1. 我写了VirtualService

apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: demo-keycloak-http namespace: keycloak spec: gateways: - keycloak-gateway hosts: - '*' http: - match: - uri: prefix: /auth route: - destination: host: demo-keycloak-http.keycloak.svc.cluster.local port: number: 80 请注意,我正在路由服务名称。 如您所见,此外,还可以从其他名称空间公开头盔图表。就您而言,也许您不必写Gateway

您只需要找到服务的名称并为其写VirtualService

相关问题