From f2df5e8c48f3711094f6b07875dc5cc1d2dbe423 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 9 Jun 2023 08:55:49 +0200 Subject: [PATCH] [k8s] add command to find and run commands in the ceph-toolbox --- k8s/rook-toolbox.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 k8s/rook-toolbox.sh diff --git a/k8s/rook-toolbox.sh b/k8s/rook-toolbox.sh new file mode 100755 index 0000000..81554ae --- /dev/null +++ b/k8s/rook-toolbox.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Nico Schottelius, 2023-06-09 +# Enter the ceph toolbox + +if [ -z "$@" ]; then + # set $1 to bash + set -- bash +fi + +kubectl exec -n rook-ceph -ti $(kubectl -n rook-ceph get pods -l app=rook-ceph-tools -o jsonpath='{.items[*].metadata.name}') -- "$@"