1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

KubernetesのIngressをIstioのサービスメッシュ(istio-ingresgateway)に接続する

Last updated at Posted at 2021-06-21

KubernetesのIngressを入口にして後はIstioのサービスメッシュに任せたい場合に、Ingressとingressgatewayを接続する必要があります。microk8sを使ってこれを実現するのに少し迷ったのでメモとして残します。

istio-ingressgateway をClusterIPにする

istio-ingressgatewayはデフォルトでLoadBalancerタイプになっていますのでClusterIPに変更します。

kubectl -n istio-system edit svc istio-ingressgateway
# type: LoadBalancer になっている部分を type: ClusterIP に変更して保存

Ingressをistio-systemネームスペースにデプロイする

istio-systemネームスペースにデプロイして、istio-ingressgatewayサービスにトラフィックを向けます。
istio-ingressgateway はサービスメッシュの入り口となるサービスで、ここから先はサービスメッシュの定義に従って制御されます。

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: http-ingress
  namespace: istio-system
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: istio-ingressgateway
          servicePort: 80

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?