Skip to content

Instantly share code, notes, and snippets.

View basilfx's full-sized avatar

Bas Stottelaar basilfx

View GitHub Profile
@basilfx
basilfx / kubectl-run-with-pvc.sh
Last active August 10, 2021 07:05 — forked from yuanying/kubectl-run-with-pvc.sh
kubectl run with PVCs
#!/bin/bash
# Modified from https://gist.github.com/yuanying/3aa7d59dcce65470804ab43def646ab6.
IMAGE="ubuntu:20.04"
COMMAND="/bin/bash"
SUFFIX=$(date +%s | shasum | base64 | fold -w 10 | head -1 | tr '[:upper:]' '[:lower:]')
usage_exit() {
echo "Usage: $0 [-n namespace] [-c command] [-i image] PVC ..." 1>&2