通过operator部署istio

发布时间 2023-05-29 21:32:04作者: 个人记录

1. 下载安装包

https://github.com/istio/istio/releases/download

2. 解压

tar xvf istio-1.17.2-linux-amd64.tar.gz

mv istio-1.17.2/bin/istioctl /usr/local/bin

验证:istioctl version

3. 安装isto的operator

istio operator init

4. 安装istio

 istioctl manifest apply -f istio-operator.yaml

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  namespace: istio-system
  name: example-istiocontrolplane
spec:
  profile: default
  components: # 自定义组件配置
    ingressGateways: # 自定义 ingressGateway 配置
      - name: istio-ingressgateway
        enabled: true # 开启 ingressGateway
        k8s:  # 自定义 ingressGateway 的 Kubernetes 配置
          service: # 将 Service 类型改成 NodePort
            type: NodePort
            ports:
            - port: 15020
              nodePort: 30520
              name: status-port
            - port: 80
              nodePort: 30080
              name: http2
              targetPort: 8080
            - port: 443
              nodePort: 30443
              name: https
              targetPort: 8443