问题描述
该笔记将记录:我们升级 Rook Ceph 集群的方法,以及相关问题的解决办法;
解决方案
参考 Rook Ceph Documentation/Health Verification 文档,以获取关于升级过程的详细内容;
环境信息
Rook Ceph: 1.10.2 => 1.10.10
Kubernetes Cluster: 1.22.15
第一步、集群健康检查
# --------------------------------------------------------- # Pods all Running # 确保如下命令无输出: kubectl -n rook-ceph get pods --no-headers | grep -v -E '\sRunning\s|\sCompleted\s' # --------------------------------------------------------- # Status Output # 检查 HEALTH_OK,mon,mgr,mds,osd,rgw,pg 状态,确保出于正常: TOOLS_POD=$(kubectl -n rook-ceph get pod -l "app=rook-ceph-tools" -o jsonpath='{.items[*].metadata.name}') kubectl -n rook-ceph exec -it $TOOLS_POD -- ceph status # --------------------------------------------------------- # Container Versions # 检查容器版本,确保各组件当前版本一致: kubectl -n $ROOK_CLUSTER_NAMESPACE get pod -o jsonpath='{range .items[*]}{.metadata.name}{"\n\t"}{.status.phase}{"\t\t"}{.spec.containers[0].image}{"\t"}{.spec.initContainers[0].image}{"\n"}{end}' # --------------------------------------------------------- # Rook Volume Health # 检查使用 Rook Ceph 的容器处于健康状态; # 在升级过程中,业务容器依旧能够正常运行;
参考文献
Rook Ceph Documentation/Health Verification