簡體   English   中英

Istio路由端口規范

[英]Istio routing ports specification

我正在嘗試從nginx Ingress切換為使用Istio ,以利用路由權重進行金絲雀部署和集成監控等功能。

我的常規路由定義為:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: solar-demo
  annotations:
    nginx.org/server-snippet: "proxy_ssl_verify off;"
spec:
  rules:
  - host: shmukler.example.com
    http:
      paths:
      - path: /city/*
        backend:
          serviceName: solar-demo
          servicePort: 3000
      - path: /solar/*
        backend:
          serviceName: solar-demo
          servicePort: 3001
--
kind: Service
apiVersion: v1
metadata:
  name: solar-demo
spec:
  ports:
  - name: city
    protocol: TCP
    port: 3000
    targetPort: 3000
  - name: solar
    protocol: TCP
    port: 3001
    targetPort: 3001
  selector:
    app: solar-demo

我什至不需要auth ,現在。 當我開始install/kubernetes/istio-demo.yaml ,它在istio-system名稱空間中創建了很多pod和服務。

我想(可能不正確)想出了一個VirtualService ,也許還定義了路由規則。 寫道:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: solar-demo
spec:
  hosts:
    - shmukler.example.com
  http:
  - route:
    - destination:
        host: shmukler.example.com
        subset: blue
      weight: 90
    - destination:
        host: shmukler.example.com
        subset: green
      weight: 10

是否在常規服務中定義了端口,而在VirtualService定義了權重和路徑? 我是否需要將任何東西粘貼到istio-system名稱空間中? 是否有可能,我需要擴展istio-demo.yaml以進行路由,只是為了使事情滾動?

任何指針表示贊賞。

您需要一個網關和一個VirtualService。

查看此任務的示例。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM