Skip to content
Go back

Fire up an interactive bash Pod within a Kubernetes cluster

Note: This blog post is a very old and is preserved here for reference. There are probably better ways to do this today!

In those cases where you need a throw-away interactive shell within your cluster:

You may, of course, use a different image or shell. Some of the arguments explained:

Note that you’ll need to update your apt cache before you can install packages:

Once you are done with your tinkering:

Post-exit, the Deployment and Pod that kubectl created will both be stopped and deleted, taking with it our container and anything we did within it.


Share this post on:

Previous Post
Recording + Slides from Helm Summit 2018