Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a kubectl plugin #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adding a kubectl plugin #7

wants to merge 1 commit into from

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