Site icon SolarDevs

Quick SSH into Kubernetes Pods

Kubernetes

After years of using kubernetes, I’ve decided to create a tool to finally stop my suffering of SSHing into the pods.

Kubesh is a small utility I created to connect to my kubernetes pods. So far it has saved me tons of wasted time and in general made me more productive.

If you find yourself constantly connecting to your pods and want a lightweight command tool to help you with that, look no further

kubesh — https://gist.github.com/Dvelezs94/f796de818562279a98a709653a1fbbdb

Installation

git clone https://gist.github.com/f796de818562279a98a709653a1fbbdb.git kubesh && chmod +x kubesh/kubesh.py && mv kubesh/kubesh.py /home/${USER}/bin/kubesh && rm -rf kubesh

Usage

Kubesh uses your existing kubeconfig, so there is no need for any configuration.

Options

# specify namespace
$ kubesh -n prod-namespace

# change shell (default: /bin/bash)
$ kubesh -s /bin/sh
Exit mobile version