2017-08-04 13:15:34 -07:00
---
title : Toolbox
2017-09-07 13:56:09 -07:00
weight : 60
2017-08-04 13:15:34 -07:00
---
2017-03-15 13:59:06 -07:00
# Rook Toolbox
2017-08-08 14:03:04 -07:00
The Rook toolbox is a container with common tools used for rook debugging and testing.
The toolbox is based on Ubuntu, so more tools of your choosing can be easily installed with `apt-get` .
2017-03-15 13:59:06 -07:00
2017-04-14 17:09:18 -07:00
## Running the Toolbox in Kubernetes
2017-08-08 14:03:04 -07:00
The rook toolbox can run as a pod in a Kubernetes cluster. After you ensure you have a running Kubernetes cluster with rook deployed (see the [Kubernetes ](kubernetes.md ) instructions),
launch the rook-tools pod.
Save the tools spec as `rook-tools.yaml` :
```yaml
apiVersion : v1
kind : Pod
metadata :
name : rook-tools
namespace : rook
spec :
2017-10-31 08:20:33 -07:00
dnsPolicy : ClusterFirstWithHostNet
2017-08-08 14:03:04 -07:00
containers :
- name : rook-tools
image : rook/toolbox:master
imagePullPolicy : IfNotPresent
env :
- name : ROOK_ADMIN_SECRET
valueFrom :
secretKeyRef :
name : rook-ceph-mon
key : admin-secret
securityContext :
privileged : true
volumeMounts :
- mountPath : /dev
name : dev
- mountPath : /sys/bus
name : sysbus
- mountPath : /lib/modules
name : libmodules
2017-10-31 08:20:33 -07:00
- name : mon-endpoint-volume
mountPath : /etc/rook
hostNetwork : false
2017-08-08 14:03:04 -07:00
volumes :
- name : dev
hostPath :
path : /dev
- name : sysbus
hostPath :
path : /sys/bus
- name : libmodules
hostPath :
path : /lib/modules
2017-10-31 08:20:33 -07:00
- name : mon-endpoint-volume
configMap :
name : rook-ceph-mon-endpoints
items :
- key : data
path : mon-endpoints
2017-08-08 14:03:04 -07:00
```
2017-03-15 13:59:06 -07:00
2017-05-05 16:30:59 -07:00
Launch the rook-tools pod:
2017-04-14 17:09:18 -07:00
```bash
2017-05-16 15:20:56 +02:00
kubectl create -f rook-tools.yaml
2017-03-15 13:59:06 -07:00
```
Wait for the toolbox pod to download its container and get to the `running` state:
2017-04-14 17:09:18 -07:00
```bash
2017-03-15 13:59:06 -07:00
kubectl -n rook get pod rook-tools
```
Once the rook-tools pod is running, you can connect to it with:
2017-04-14 17:09:18 -07:00
```bash
2017-03-15 13:59:06 -07:00
kubectl -n rook exec -it rook-tools bash
```
All available tools in the toolbox are ready for your troubleshooting needs. Example:
2017-04-14 17:09:18 -07:00
```bash
2017-06-20 12:10:30 -07:00
rookctl status
2017-03-15 13:59:06 -07:00
ceph df
rados df
```
2017-08-08 14:03:04 -07:00
When you are done with the toolbox, remove the pod:
2017-04-14 17:09:18 -07:00
```bash
2017-08-08 14:03:04 -07:00
kubectl -n rook delete pod rook-tools
2017-03-15 13:59:06 -07:00
```