


























Before starting any upgrade, verify the cluster is healthy:
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph status
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph health detail
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph osd statAll conditions must be true:
HEALTH_OKdown or outactive+cleanCRDs must be updated before the operator upgrade. The new operator may depend on CRD fields that do not exist yet, so always apply CRDs first:
kubectl apply -f https://raw.githubusercontent.com/rook/rook/v1.14.0/deploy/examples/crds.yamlVerify the CRDs were updated:
kubectl get crd | grep cephWith CRDs in place, upgrade the Rook operator. Use the Helm upgrade:
helm repo update
helm upgrade rook-ceph rook-release/rook-ceph \
--namespace rook-ceph \
--version v1.14.0 \
-f values.yamlOr apply the updated operator manifests directly:
kubectl -n rook-ceph apply -f https://raw.githubusercontent.com/rook/rook/v1.14.0/deploy/examples/operator.yamlMonitor the operator rollout:
kubectl -n rook-ceph rollout status deploy/rook-ceph-operatorEdit the CephCluster resource to bump the Ceph image:
spec:
cephVersion:
image: quay.io/ceph/ceph:v18.2.4
allowUnsupported: falseApply the change:
kubectl -n rook-ceph apply -f ceph-cluster.yamlThe Rook operator performs a rolling upgrade of all Ceph daemons:
watch kubectl -n rook-ceph get podsCheck the upgrade status via the CephCluster status:
kubectl -n rook-ceph get cephcluster rook-ceph -o jsonpath='{.status.ceph}' | python3 -m json.toolkubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph version
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph status
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph osd versions
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph mon versions
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph mgr versionsEnsure all daemons report the new version.
If the upgrade causes issues, revert the Ceph image in the CephCluster spec and re-apply. Rook will roll back the daemon versions. Note that Ceph downgrades are not always safe - if internal data formats were upgraded during the new version's startup, reverting the image may cause issues. Test rollback procedures in a non-production environment first:
kubectl -n rook-ceph patch cephcluster rook-ceph --type merge \
-p '{"spec":{"cephVersion":{"image":"quay.io/ceph/ceph:v18.2.2"}}}'A Ceph upgrade runbook ensures every step is documented and repeatable. The sequence is: validate health, update CRDs, upgrade the operator, bump the Ceph image, and confirm all daemons are running the new version. Always verify cluster health before and after each phase.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。