Not able to attach pod rook-ceph-tools in a Kubernetes cluster

52 views Asked by At

I have installed rook-ceph in a kubernets cluster. I installed it usin helm chart. I gave the following commands.

helm repo add rook-release https://charts.rook.io/release
curl -fsSL -o ~/rook-values.yaml https://raw.githubusercontent.com/rook/rook/release-1.13/deploy/charts/rook-ceph/values.yaml
helm install --create-namespace --namespace rook-ceph rook-ceph rook-release/rook-ceph -f ~/rook-values.yaml
helm install --create-namespace --namespace rook-ceph rook-ceph-cluster --set operatorNamespace=rook-ceph rook-release/rook-ceph-cluster -f ~/rook-values.yaml

I also installed rook-ceph-tools using the following command.

kubectl create -f https://raw.githubusercontent.com/rook/rook/master/deploy/examples/toolbox.yaml

I had raw harddisk in each of the worker nodes. All of them are discovered and the rook installatio was successfull. I can reach to the ceph dashboard and see that rook is working fine. Here is the list of rook pods.

rook-ceph      csi-cephfsplugin-5gg94                              2/2     Running     0               7h55m
rook-ceph      csi-cephfsplugin-7r2g9                              2/2     Running     1 (7h55m ago)   7h55m
rook-ceph      csi-cephfsplugin-provisioner-67b5c7f475-bl6jj       5/5     Running     2 (7h54m ago)   7h55m
rook-ceph      csi-cephfsplugin-provisioner-67b5c7f475-htdpp       5/5     Running     1 (7h55m ago)   7h55m
rook-ceph      csi-cephfsplugin-sjsmn                              2/2     Running     1 (7h55m ago)   7h55m
rook-ceph      csi-rbdplugin-m67bx                                 2/2     Running     1 (7h55m ago)   7h55m
rook-ceph      csi-rbdplugin-nwxj7                                 2/2     Running     1 (7h55m ago)   7h55m
rook-ceph      csi-rbdplugin-provisioner-657d6bc4c4-gk5hl          5/5     Running     0               7h55m
rook-ceph      csi-rbdplugin-provisioner-657d6bc4c4-hpq98          5/5     Running     3 (7h54m ago)   7h55m
rook-ceph      csi-rbdplugin-s7fc2                                 2/2     Running     0               7h55m
rook-ceph      rook-ceph-crashcollector-worker0-7bbc6f4549-9mnzp   1/1     Running     0               7h52m
rook-ceph      rook-ceph-crashcollector-worker1-67d4687bb6-982qb   1/1     Running     0               7h52m
rook-ceph      rook-ceph-crashcollector-worker2-5bbdc64cff-jkgl9   1/1     Running     0               7h52m
rook-ceph      rook-ceph-exporter-worker0-5d5c458d78-j79p5         1/1     Running     0               7h52m
rook-ceph      rook-ceph-exporter-worker1-67dcbc86df-2t2sj         1/1     Running     0               7h52m
rook-ceph      rook-ceph-exporter-worker2-7fbf8dff84-wctbg         1/1     Running     0               7h52m
rook-ceph      rook-ceph-mds-ceph-filesystem-a-84fb649c6f-hg79b    2/2     Running     0               7h52m
rook-ceph      rook-ceph-mds-ceph-filesystem-b-7cf7db7b87-r88zb    2/2     Running     0               7h52m
rook-ceph      rook-ceph-mgr-a-5b5b87d556-zchsz                    3/3     Running     0               7h53m
rook-ceph      rook-ceph-mgr-b-67bcb7bbcc-n99g8                    3/3     Running     0               7h53m
rook-ceph      rook-ceph-mon-a-867548c55b-nsb9v                    2/2     Running     0               7h55m
rook-ceph      rook-ceph-mon-b-d4d7c7559-9pdmt                     2/2     Running     0               7h54m
rook-ceph      rook-ceph-mon-c-7d6c499c5f-28f4q                    2/2     Running     0               7h54m
rook-ceph      rook-ceph-operator-556cd7b985-hqsg5                 1/1     Running     0               7h57m
rook-ceph      rook-ceph-osd-0-6875dc89d8-p4hc2                    2/2     Running     0               7h52m
rook-ceph      rook-ceph-osd-1-7f495f8688-d7bfk                    2/2     Running     0               7h52m
rook-ceph      rook-ceph-osd-2-ff7f69f57-w7mvq                     2/2     Running     0               7h52m
rook-ceph      rook-ceph-osd-prepare-worker0-xc6bf                 0/1     Completed   0               7h52m
rook-ceph      rook-ceph-osd-prepare-worker1-mx5hf                 0/1     Completed   0               7h52m
rook-ceph      rook-ceph-osd-prepare-worker2-xmgdm                 0/1     Completed   0               7h52m
rook-ceph      rook-ceph-rgw-ceph-objectstore-a-68f5d4c68b-ntlsq   2/2     Running     0               7h51m
rook-ceph      rook-ceph-tools-66b77b8df5-z84dk                    1/1     Running     0               7h57m

However, the following command is failing.

kubectl attach rook-ceph-tools-66b77b8df5-z84dk -n rook-ceph
If you don't see a command prompt, try pressing enter.
Error from server:

Any ideas why?

I had found somewhere that there may be mismatch of versions of rook-ceph and rook-ceph-tools. I could not figure out if this is a problem. I do not know where to see the versions of them.

1

There are 1 answers

0
Ashutosh Gupta On

The following command worked.

$kubectl exec -it rook-ceph-tools-66b77b8df5-z84dk -n rook-ceph -- bash

I was able to enter in the pod.