Istioゲートウェイおよび仮想サービス

Istioゲートウェイおよび仮想サービスの詳細

Istioゲートウェイ

ゲートウェイは、メッシュに接続して着信または発信HTTP/TCP接続を受信するロード・バランサです。公開するポートや、使用するプロトコルなどを指定します。

次に、Hello Helidon Greetアプリケーションにパブリック・アクセスを転送する例を示します。domain nameを、Verrazzanoで使用されるKubernetesクラスタ・ドメインに置き換えます。これにより、リソースのホスト・エントリの完全修飾ドメイン名を保持することが保証されます。

apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
  name: hello-helidon-hello-helidon-gw
  namespace: hello-helidon
spec:
  selector:
    istio: ingressgateway
  servers:
  - hosts:
    - hello-helidon.hello-helidon.<domain name>
    name: hello-helidon-ingress
    port:
      name: https-hello-helidon-ingress
      number: 443
      protocol: HTTPS
    tls:
      credentialName: hello-helidon-hello-helidon-ingress-cert-secret # Secret that contains the certificate used for TLS
      mode: SIMPLE

Istio仮想サービス

仮想サービスは、ゲートウェイをKubernetesサービスに接続するのに役立ちます。これは、特定のプロトコルの一致基準に基づいてトラフィックをルーティングするための一連のルールです。トラフィックは、基準に一致すると、指定された宛先サービスに送信されます。

次に、Hello Helidon GreetアプリケーションをIstioサービス・レジストリに登録する例を示します。
domain nameを、Verrazzanoで使用されるKubernetesクラスタ・ドメインに置き換えます。これにより、リソースのホスト・エントリの完全修飾ドメイン名を保持することが保証されます。

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: hello-helidon-ingress-rule-0-vs
namespace: hello-helidon
spec:
gateways:
- hello-helidon-hello-helidon-gw
hosts:
- hello-helidon.hello-helidon.<domain name>
http:
- match:
- uri:
prefix: /greet
route:
- destination:
host: hello-helidon-deployment
port:
number: 8080