#!/bin/bash show_help(){ echo "Create a temporary deployment (with a pod) based on the name provided" echo " createtemp " echo " >createtemp dv06 client" echo "" echo "Create a temporary deplyment (with a pod) using the default name \"client\"" echo " createtemp " echo " >createtemp dv06" echo "" echo "Note: Wait until prompt is provided." echo "" echo "Help: " echo " >createtemp -h" echo "" echo "Short for:" echo " kubectl run -it --rm=true client --image=tutum/curl --namespace " echo " kubectl run -it --rm=true --image=tutum/curl --namespace " } case $1 in -h) show_help ;; *) case $# in 1) kubectl run -it --rm=true client --image=tutum/curl --namespace $1 ;; 2) kubectl run -it --rm=true $2 --image=tutum/curl --namespace $1 ;; *) show_help esac esac