srl-labs / clabernetes

containerlab, but in kubernetes!
BSD 3-Clause "New" or "Revised" License
60 stars 9 forks source link

create a shortcut cmd in the launcher to immediately get into the hosted container's shell #134

Closed hellt closed 7 months ago

hellt commented 7 months ago

create the executable /usr/local/bin/sshin with the following contents

#!/bin/bash
ssh $(docker ps -a --format {{.Names}})

Then, when connected to the launcher a user might just type sshin and get into the shell.

This will also work with the kubectl:

k exec -it <pod-name> -- sshin