首页 > 其他分享 >rancher upgrade 【rancher 升级】

rancher upgrade 【rancher 升级】

时间:2024-09-09 14:22:54浏览次数:12  
标签:upgrade 218d system 升级 Running cattle rancher kube


rancher upgrade 【rancher 升级】_nginx


文章目录

  • 1. 背景
  • 2. 下载
  • 3. 安装
  • 4. 检查
  • 5. 测试
  • 5.1 创建项目
  • 5.2 创建应用
  • 5.3 删除集群
  • 5.4 注册集群


1. 背景

rancher v2.8.2 升级 v2.9.1

2. 下载

下载charts

helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo update
helm fetch rancher-latest/rancher --version=v2.9.1

下载镜像

  • 请参考:Helm Deploy Online Rancher v2.9.1

3. 安装

helm upgrade rancher ./rancher-2.9.1.tgz \
    --namespace cattle-system \
    --set hostname=rancheruat.demo.com.cn \
    --set rancherImage=harbor.bsgchina.com/rancher \
    --set ingress.tls.source=secret \
    --set privateCA=true \
    --set systemDefaultRegistry=harbor.bsgchina.com \
    --set useBundledSystemChart=true

4. 检查

pod状态

$ for i in `kubectl get ns |grep cattle | awk '{print $1}'` ;do kubectl get pod -n $i ;done
No resources found in cattle-fleet-clusters-system namespace.
NAME                          READY   STATUS    RESTARTS   AGE
fleet-agent-0                 2/2     Running   0          99m
fleet-agent-fd575fbd5-xzl9l   1/1     Running   0          19h
NAME                                READY   STATUS    RESTARTS   AGE
fleet-controller-56648b754c-kj9gz   3/3     Running   0          99m
gitjob-5c499c5c7f-nskm5             1/1     Running   0          99m
No resources found in cattle-global-data namespace.
No resources found in cattle-global-nt namespace.
No resources found in cattle-impersonation-system namespace.
NAME                                       READY   STATUS      RESTARTS   AGE
capi-controller-manager-5f5f4fff9d-g48qk   1/1     Running     0          101m
rancher-provisioning-capi-patch-sa-9fsk8   0/1     Completed   0          107s
NAME                              READY   STATUS    RESTARTS   AGE
rancher-backup-787bd4b98b-dwff8   1/1     Running   0          5h11m
NAME                               READY   STATUS    RESTARTS       AGE
rancher-779dff5dc9-bzrb8           1/1     Running   0              103m
rancher-779dff5dc9-f42mt           1/1     Running   0              118m
rancher-779dff5dc9-jsl5p           1/1     Running   1 (104m ago)   118m
rancher-webhook-749d6bd65d-jmqdt   1/1     Running   0              100m
No resources found in cattle-ui-plugin-system namespace.

登陆界面,检查未升级之前创建的用户与导入的集群相关数据都在。确认数据没有丢失。

rancher upgrade 【rancher 升级】_nginx_02

查询注册的集群cluster01 的 pod 状态。

$ kubectl get pod -A
NAMESPACE             NAME                                                    READY   STATUS      RESTARTS      AGE
cattle-fleet-system   fleet-agent-0                                           0/2     Init:0/1    0             11m
cattle-fleet-system   fleet-agent-56f48d899f-8wpw9                            1/1     Running     0             101m
cattle-system         cattle-cluster-agent-855f9ffddf-nhrls                   1/1     Running     0             101m
cattle-system         helm-operation-8sdhg                                    0/2     Completed   0             30m
cattle-system         rancher-webhook-7b44dcb98-hhlp4                         1/1     Running     0             30m

查询镜像版本,并未所有相关注册镜像的pod 更新。

$ for i in `kubectl get ns |grep cattle | awk '{print $1}'` ;do kubectl get pod -n $i -oyaml |grep image: | awk '{print $2}' | sort -r | uniq;done
image:
harbor.bsgchina.com/rancher/fleet-agent:v0.9.0
harbor.bsgchina.com/rancher/fleet-agent:v0.10.1
harbor.bsgchina.com/rancher/shell:v0.2.1
harbor.bsgchina.com/rancher/rancher-webhook:v0.5.1
harbor.bsgchina.com/rancher/rancher-agent:v2.9.1

5. 测试

5.1 创建项目

创建test2

rancher upgrade 【rancher 升级】_nginx_03

5.2 创建应用

但并未影响在注册的集群创建应用。

rancher upgrade 【rancher 升级】_创建项目_04

5.3 删除集群

rancher upgrade 【rancher 升级】_创建项目_05


rancher upgrade 【rancher 升级】_f5_06

$ kubectl get pod -A
NAMESPACE     NAME                                                    READY   STATUS      RESTARTS      AGE
default       nginx                                                   1/1     Running     0             17h
kube-system   cloud-controller-manager-rke-master01                   1/1     Running     3 (37h ago)   218d
kube-system   etcd-rke-master01                                       1/1     Running     4             218d
kube-system   helm-install-rke2-canal-wvpzk                           0/1     Completed   0             218d
kube-system   helm-install-rke2-coredns-t6mqj                         0/1     Completed   0             218d
kube-system   helm-install-rke2-ingress-nginx-pcqjv                   0/1     Completed   0             218d
kube-system   helm-install-rke2-metrics-server-wnnmr                  0/1     Completed   0             218d
kube-system   helm-install-rke2-snapshot-controller-crd-kfxdx         0/1     Completed   0             218d
kube-system   helm-install-rke2-snapshot-controller-qgz6b             0/1     Completed   1             218d
kube-system   helm-install-rke2-snapshot-validation-webhook-kw97t     0/1     Completed   0             218d
kube-system   kube-apiserver-rke-master01                             1/1     Running     1             218d
kube-system   kube-controller-manager-rke-master01                    1/1     Running     3 (37h ago)   218d
kube-system   kube-proxy-rke-master01                                 1/1     Running     2 (37h ago)   37h
kube-system   kube-scheduler-rke-master01                             1/1     Running     1 (37h ago)   218d
kube-system   rke2-canal-47k9j                                        2/2     Running     2 (37h ago)   218d
kube-system   rke2-coredns-rke2-coredns-565dfc7d75-8b2qk              1/1     Running     1 (37h ago)   218d
kube-system   rke2-coredns-rke2-coredns-autoscaler-6c48c95bf9-xzv5w   1/1     Running     1 (37h ago)   218d
kube-system   rke2-ingress-nginx-controller-ljx7t                     1/1     Running     1 (37h ago)   218d
kube-system   rke2-metrics-server-c9c78bd66-zslfq                     1/1     Running     1 (37h ago)   218d
kube-system   rke2-snapshot-controller-6f7bbb497d-x8d8t               1/1     Running     1 (37h ago)   218d
kube-system   rke2-snapshot-validation-webhook-65b5675d5c-v9mlx       1/1     Running     1 (37h ago)   218d

5.4 注册集群

rancher upgrade 【rancher 升级】_创建项目_07


rancher upgrade 【rancher 升级】_nginx_08


rancher upgrade 【rancher 升级】_nginx_09


rancher upgrade 【rancher 升级】_f5_10


rancher upgrade 【rancher 升级】_rancher_11

$ curl --insecure -sfL https://rancheruat.demo.com.cn/v3/import/lppzthqddjmx427dhd8ggdv6ddfc2gzrrg9r2rf7bk66hjlkmg22m5_c-m-8m97ngwv.yaml | kubectl apply -f -
$ kubectl edit deploy cattle-cluster-agent -n cattle-system
…..
      dnsPolicy: ClusterFirst
      hostAliases:
      - hostnames:
        - rancheruat.demo.com.cn
        ip: 192.168.23.79
      restartPolicy: Always
      schedulerName: default-scheduler
…..

集群重新加入成功。

rancher upgrade 【rancher 升级】_f5_12


标签:upgrade,218d,system,升级,Running,cattle,rancher,kube
From: https://blog.51cto.com/ghostwritten/11960839

相关文章

  • 极狐GiLab 17.3 重点功能解读 & 升级指南
    沿袭我们的月度发布传统,极狐GitLab发布了17.2版本,该版本带来了从极狐GitLabUI上删除Pod、从本地终端轻松连接到集群以及为单个项目添加多个合规框架等几十个重点功能的改进。下面是部分重点功能的详细解读。关于极狐GitLab的安装升级,可以查看官方指导文档。极狐GitLab......
  • ubuntu升级python版本
    ubuntu升级python版本#更新包列表sudoaptupdate#安装Python所需的软件包sudoaptinstallsoftware-properties-common#添加PythonPPA(以Python3.12为例)sudoadd-apt-repositoryppa:deadsnakes/ppasudoaptupdate#安装新版本sudoaptinstallpython3.1......
  • AI预测体彩排3采取888=3策略+和值012路或胆码测试9月7日升级新模型预测第75弹
             经过70多期的测试,当然有很多彩友也一直在观察我每天发的预测结果,得到了一个非常有价值的信息,那就是9码定位的命中率非常高,已到达90%的命中率,这给喜欢打私菜的朋友提供了极高价值的预测结果~当然了,大部分菜友还是走的正常渠道,因此,得想办法进行缩水,尽可能少的......
  • 828华为云征文|华为云Flexus X实例docker部署rancher并构建k8s集群
    828华为云征文|华为云FlexusX实例docker部署rancher并构建k8s集群华为云最近正在举办828B2B企业节,FlexusX实例的促销力度非常大,特别适合那些对算力性能有高要求的小伙伴。如果你有自建MySQL、Redis、Nginx等服务的需求,一定不要错过这个机会。赶紧去看看吧!什么是华为云Fl......
  • Helm Deploy Online Rancher v2.9.1
    文章目录准备安装查看下载准备$kubectlgetnodeNAMESTATUSROLESAGEVERSIONkube-master01Readycontrol-plane19dv1.29.5kube-node01Ready<none>19dv1.29.5kube-node02Ready<none>19......
  • uninstall rancher【卸载 rancher】
    yum-yinstallgitgitclonehttps://github.com/rancher/rancher-cleanup.gitcdrancher-cleanupkubectlcreate-fdeploy/rancher-cleanup.yamlkubectl-nkube-systemlogs-ljob-name=cleanup-job-fkubectlcreate-fdeploy/verify.yamlkubectl-nkube-......
  • Gitlab-ce upgrade 16.0.1 to 17.3.1【Gitlab-ce 16.0.1 升级 17.3.1】
    文章目录背景gitlab-ce16.0.1升级17.3.1失败gitlab-ce16.0.1升级16.11.8失败gitlab-ce16.0.1升级16.7.9失败gitlab-ce16.0.1升级16.3.8成功gitlab-ce16.3.8升级16.11.8失败gitlab-ce16.3.8升级16.7.9成功gitlab-ce16.7.9升级16.11.8成功gitlab-ce16.......
  • mac升级node到指定版本
    node版本升级到稳定版18.16.1(1)node-v(2)npmcacheclean-f 在使用npm cacheclear--force清除缓存的时候,报npmWARNusing--forceRecommendedprotectionsdisabled的错误,有可能是镜相源过期的问题  换为npmcacheverify(3) sudonstable//把当前系统的N......
  • 升级MySQL5.7,开发要注意哪些坑
    前段时间,将线上MySQL数据库升级到了5.7。考虑到可能产生的不兼容性,在升级之前,确实也是战战兢兢,虽然测试环境,开发环境早在半年前就已提前升级。基于前期的调研和朋友的反馈,与开发相关的主要有两点:sql_modeMySQL5.6中,其默认值为"NO_ENGINE_SUBSTITUTION",可理解为非严格模式,譬如......
  • 简单比较 http https http2,我们要如何把http升级为https
    ......