Skip to content

Adding a kubectl plugin#7

Open
rmkraus wants to merge 1 commit into
kayrus:masterfrom
rmkraus:master
Open

Adding a kubectl plugin#7
rmkraus wants to merge 1 commit into
kayrus:masterfrom
rmkraus:master

Conversation

@rmkraus

@rmkraus rmkraus commented Jan 29, 2023

Copy link
Copy Markdown

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.

Comment thread kubectl-kuttle

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

Copy link
Copy Markdown
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?

Comment thread kubectl-kuttle
@@ -0,0 +1,20 @@
#!/bin/bash

Copy link
Copy Markdown
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