我想通过Istio ingress公开一些Helm Charts .
例如,今天我可以通过 Ingress
类型(使用NginX Ingress)公开Kubernetes Dashboard: helm install stable/kubernetes-dashboard --set ingress.enabled=true
但是,对于Istio would I have to fork Kubernetes Dashboard Helm图表添加所需的 Gateway
和 VirtualService
yaml?
或者是否有更好的方法来修补开源图表以与Istio ingress一起使用?
2 回答
实际上你可以不用包装就做到这一点 . 在我的情况下,我不得不将Keycloak公开为
VirtualService
. 其他 namespace 也是keycloak .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: - "*"
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
如您所见,此外可以从其他命名空间中公开helm图表 . 在你的情况下,也许你不需要写
Gateway
您只需找到服务名称并为其编写
VirtualService
.您可以在
requirements.yaml
中创建自己的图表,其中包含stable/kubernetes-dashboard
作为依赖项 . 然后,您有效地拥有一个包含仪表板的包装图表,您可以在包装器级别包含Istio ingress配置 .