Skip to content

Conversation

rmkraus
Copy link

@rmkraus rmkraus commented Jan 29, 2023

This PR creates an additional bash script that acts as a plugin to kubectl. If this file, kuttle, and sshuttle are all in the user's path; then they may run kubectl kuttle start and kubectl kuttle stop to control their tunnel into the cluster.


# start the sshuttle tunnel
if [[ $1 == "start" ]]; then
mkdir -p ~/.cache
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your contribution. can you add tabs or spaces to make the code more human readable?

@@ -0,0 +1,20 @@
#!/bin/bash
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it also makes sense to convert the script to a plain posix shell. e.g. #!/bin/sh and add an -e flag to stop in case of errors: https://www.grymoire.com/Unix/Sh.html#uh-55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants