【问题标题】:Istio 1.4.3 to 1.5.6 upgrade using istioctl and Istio operator使用 istioctl 和 Istio operator 升级 Istio 1.4.3 到 1.5.6
【发布时间】:2021-01-14 00:56:21
【问题描述】:

我可以使现有的 Istio 开源可安装与 (Istioctl + Operator) 兼容吗?我目前通过 istioctl 安装了 Istio 1.4.3 .. 并且需要在升级到 Istio 1.5.6+ 之前让现有的部署 Istio 操作员知道。这里有什么具体的步骤吗?

【问题讨论】:

    标签: kubernetes istio kubernetes-operator servicemesh


    【解决方案1】:

    应该没有问题,我已经在我的测试集群上尝试过,一切正常。

    我在立即从 1.4.3 升级到 1.5.6 时遇到了问题,因此通过以下步骤,您首先从 1.4.3 升级到 1.5.0,然后从 1.5.0 升级到 1.5.6

    看看下面的步骤。


    1.关注 istio documentation 并安装 istioctl 1.4、1.5 和 1.5.6:

    curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.4.0 sh -
    curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.5.0 sh -
    curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.5.6 sh -
    

    2.将 istioctl 1.4 添加到您的路径

    cd istio-1.4.0
    export PATH=$PWD/bin:$PATH
    

    3.安装 istio 1.4

    istioctl manifest apply --set profile=demo
    

    4.检查是否一切正常。

    kubectl get pod -n istio-system
    kubectl get svc -n istio-system
    istioctl version
    

    5.将 istioctl 1.5 添加到您的路径

    cd istio-1.5.0
    export PATH=$PWD/bin:$PATH
    

    6.安装istio operator以备将来升级。

    istioctl operator init
    

    7.准备 IstioOperator.yaml

    nano IstioOperator.yaml
    

    apiVersion: install.istio.io/v1alpha1
    kind: IstioOperator
    metadata:
      namespace: istio-system
      name: example-istiocontrolplane
    spec:
      profile: demo
      tag: 1.5.0
    

    8.升级前使用以下命令

    kubectl -n istio-system delete service/istio-galley deployment.apps/istio-galley
    kubectl delete validatingwebhookconfiguration.admissionregistration.k8s.io/istio-galley
    

    9.使用 istioctl upgrade 从 1.4 升级到 1.5 并准备好 IstioOperator.yaml

    istioctl upgrade -f IstioOperator.yaml 
    

    10.升级后使用以下命令

    kubectl -n istio-system delete deployment istio-citadel istio-galley istio-pilot istio-policy istio-sidecar-injector istio-telemetry
    kubectl -n istio-system delete service istio-citadel istio-policy istio-sidecar-injector istio-telemetry
    kubectl -n istio-system delete horizontalpodautoscaler.autoscaling/istio-pilot horizontalpodautoscaler.autoscaling/istio-telemetry
    kubectl -n istio-system delete pdb istio-citadel istio-galley istio-pilot istio-policy istio-sidecar-injector istio-telemetry
    kubectl -n istio-system delete deployment istiocoredns
    kubectl -n istio-system delete service istiocoredns
    

    11.检查是否一切正常。

    kubectl get pod -n istio-system
    kubectl get svc -n istio-system
    istioctl version
    

    12.更改 istio IstioOperator.yaml 标签值

    nano IstioOperator.yaml
    

    apiVersion: install.istio.io/v1alpha1
    kind: IstioOperator
    metadata:
      namespace: istio-system
      name: example-istiocontrolplane
    spec:
      profile: demo
      tag: 1.5.6    <---
    

    13.使用istioctl升级从1.5升级到1.5.6并准备好IstioOperator.yaml

    istioctl upgrade -f IstioOperator.yaml 
    

    14.将 istioctl 1.5.6 添加到您的路径

    cd istio-1.5.6
    export PATH=$PWD/bin:$PATH
    

    15.我已经部署了一个 bookinfo 应用来检查一切是否正常。

    kubectl label namespace default istio-injection=enabled
    kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
    kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
    

    16.结果

    curl -v xx.xx.xxx.xxx/productpage | grep HTTP
    HTTP/1.1 200 OK
    
    
    istioctl version
    client version: 1.5.6
    control plane version: 1.5.6
    data plane version: 1.5.6 (9 proxies)
    

    如果还有其他问题,请告诉我。

    【讨论】:

      猜你喜欢
      • 2021-07-09
      • 1970-01-01
      • 2020-09-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多