ssh-operator allows you to ssh into a pod without kubectl exec
.
Yes, ssh-operator is no-good, gross, and very very bad. But sometimes, no-good, gross, and very very bad is exactly what you need.
ssh-operator was created to decouple "transitioning to kubernetes" and "taking away shell access", and could be useful when:
- You don't want to train your dev team with kubectl.
- You want to pair on a production system.
- You just want to see the world burn.
Currently, you have to clone the repo and
kubectl apply -f deploy/ -n tmate
In the future, you will be able to install this with helm.
kubectl annotate pod $POD ssh.in="true"
After the ssh pod connects to $POD, you will be able to
kubectl get pod $POD -o=jsonpath="{.metadata.annotations.ssh}"
and use the connection string.
Tmate is a fork of tmux, and can be used to share a screen. In order to annotate a pod with an ssh address:
- A new tmate pod is brought up
- The tmate pod
kubectl exec
s to the original pod - The tmate pod annotates the original pod with the ssh address.
This is an easy kubernetes project to start contributing to! Take a look at the issues and projects.