跳到主要内容

5.8.1升级至5.9.0文档

版本变更

5.9.0 版本变更

控制台升级

数据中心升级

1. 更新 grctl 命令

docker run -it --rm -v /:/rootfs  registry.cn-hangzhou.aliyuncs.com/goodrain/rbd-grctl:v5.9.0-release copy
mv /usr/local/bin/rainbond-grctl /usr/local/bin/grctl && grctl install

注意:如果遇到无法安装 grctl 可以参考 grctl 安装文档

2. 执行升级命令

grctl cluster upgrade --new-version=v5.9.0-release

3.更换 operator 镜像并修改挂载

kubectl edit deploy rainbond-operator -n rbd-system
  • 替换镜像为以下

    registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond-operator:v5.9.0-release
  • 修改挂载的配置如下,注意 volumeMounts 以及volume 格式对齐

    volumeMounts:
    - mountPath: /var
    name: vardir
    - mountPath: /run
    name: rundir

    volumes:
    - hostPath:
    path: /run
    type: Directory
    name: rundir
    - hostPath:
    path: /var
    type: Directory
    name: vardir

配置文件如下:
# 需要配置 image volumeMounts 以及 volumes 字段的内容

# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
meta.helm.sh/release-name: rainbond
meta.helm.sh/release-namespace: rbd-system
creationTimestamp: "2022-10-10T03:28:19Z"
generation: 1
labels:
app.kubernetes.io/managed-by: Helm
control-plane: rainbond-operator
release: rainbond
name: rainbond-operator
namespace: rbd-system
resourceVersion: "926"
uid: 5fd3bcf3-52e2-4a29-a653-511bb0cd7058
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
control-plane: rainbond-operator
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
control-plane: rainbond-operator
release: rainbond
spec:
containers:
- args:
- --leader-elect
- --zap-log-level=4
command:
- /manager
image: registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond-operator:v5.9.0-release
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 8081
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 20
successThreshold: 1
timeoutSeconds: 1
name: rainbond-operator
readinessProbe:
failureThreshold: 3
httpGet:
path: /readyz
port: 8081
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
requests:
cpu: 100m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var
name: vardir
- mountPath: /run
name: rundir
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: rainbond-operator
serviceAccountName: rainbond-operator
terminationGracePeriodSeconds: 10
volumes:
- hostPath:
path: /run
type: Directory
name: rundir
- hostPath:
path: /var
type: Directory
name: vardir

  • 等待 operator 启动完成以后重启 node 以及 chaos
kubectl delete ds rbd-chaos rbd-node -n rbd-system
caution

非 helm 安装的 Rainbond,出现以下报错为正常现象,可以忽略

error: update rainbond components: get rbdcomponent rbd-app-ui: rbdcomponents.rainbond.io "rbd-app-ui" not found