21zoo Labs - Assorted Stuff

Interactive Bash Shell in Kubernetes

Posted — Apr 11, 2019

When you need a quick shell in your Kubernetes cluster:

kubectl run my-shell --rm -i --tty --image ubuntu -- bash

Warning: this will create the shell in the default namespace normally has resource constraints that will lead to termiantion of processes that take up too much CPU or memory.
If this is a problem, add --namespace <<ns>> where <<ns>> is an existing namespace and the shell will be created there.