"system:serviceaccount:rook-ceph-system:rook-ceph-system" cannot get pods/log in the namespace "rook-ceph"

时间:2022-04-04 22:24:38

1.kubectl logs -f   rook-ceph-operator-86776bbc44-cv5hs   -n rook-ceph-system

日志:E | op-cluster: unknown ceph major version. failed to get version job log to detect version. failed to read from stream. pods "rook-ceph-detect-version-mgg5b" is forbidden: User "system:serviceaccount:rook-ceph-system:rook-ceph-system" cannot get pods/log in the namespace "rook-ceph"

2.解决方法:用最新的代码:https://github.com/rook/rook

https://github.com/rook/rook.git

3.

kubectl apply -f operator.yaml
kubectl apply -f cluster.yaml

4.

[root@node1 ceph]# kubectl get pod -n rook-ceph
NAME READY STATUS RESTARTS AGE
rook-ceph-mgr-a-78ff78b97f-f5xbk 1/1 Running 0 6m
rook-ceph-mon-a-5c65fbc964-gj2b5 1/1 Running 0 7m
rook-ceph-mon-b-57dbbcd97c-m955n 1/1 Running 0 6m
rook-ceph-mon-c-6788886949-wh656 1/1 Running 0 6m
rook-ceph-osd-0-566f997c65-68bfg 1/1 Running 0 5m
rook-ceph-osd-1-69f4666d58-6bchg 1/1 Running 0 5m
rook-ceph-osd-2-67cc47fb4d-h65t2 1/1 Running 0 5m
rook-ceph-osd-prepare-node1-5cjt5 0/2 Completed 0 6m
rook-ceph-osd-prepare-node2-bz6z7 0/2 Completed 0 6m
rook-ceph-osd-prepare-node3-g9lkn 0/2 Completed 0 6m
You have new mail in /var/spool/mail/root