gpt4 book ai didi

kubernetes - 使用 istioctl 和 Istio operator 升级 Istio 1.4.3 到 1.5.6

转载 作者:行者123 更新时间:2023-12-02 11:41:58 27 4
gpt4 key购买 nike

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

最佳答案

应该没有任何问题,我已经在我的测试集群上尝试过,一切正常。
我在立即从 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)

让我知道是否还有其他问题。

关于kubernetes - 使用 istioctl 和 Istio operator 升级 Istio 1.4.3 到 1.5.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64102230/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com