1
0
mirror of https://github.com/ceph/ceph-csi.git synced 2024-12-26 23:10:22 +00:00
ceph-csi/examples/rbd/logs.sh

16 lines
384 B
Bash
Raw Normal View History

2018-07-18 14:49:15 +00:00
#!/bin/bash
CONTAINER_NAME=csi-rbdplugin
POD_NAME=$(kubectl get pods -l app=$CONTAINER_NAME -o=name | head -n 1)
function get_pod_status() {
echo -n "$(kubectl get "$POD_NAME" -o jsonpath="{.status.phase}")"
2018-07-18 14:49:15 +00:00
}
while [[ "$(get_pod_status)" != "Running" ]]; do
sleep 1
echo "Waiting for $POD_NAME (status $(get_pod_status))"
done
kubectl logs -f "$POD_NAME" -c "$CONTAINER_NAME"