Skip to content

Instantly share code, notes, and snippets.

View alicefr's full-sized avatar

Alice Frosi alicefr

  • Red Hat
  • Germany
View GitHub Profile
@alicefr
alicefr / kubectl-run-with-pvc.sh
Created March 5, 2021 15:35 — forked from yuanying/kubectl-run-with-pvc.sh
kubectl run with PVCs
#!/bin/bash
IMAGE="gcr.io/google-containers/ubuntu-slim:0.14"
COMMAND="/bin/bash"
SUFFIX=$(date +%s | shasum | base64 | fold -w 10 | head -1 | tr '[:upper:]' '[:lower:]')
usage_exit() {
echo "Usage: $0 [-c command] [-i image] PVC ..." 1>&2
exit 1
}