File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,3 +36,11 @@ Released with [krew release bot](https://github.com/rajatjindal/krew-release-bot
3636
3737- https://krew.sigs.k8s.io/docs/developer-guide/testing-locally/
3838- https://github.com/rajatjindal/krew-release-bot#testing-the-template-file
39+
40+ ## Use as standalone without plugin
41+
42+ You don't have to install this as a plugin via krew. You can also download and invoke the tool directly:
43+
44+ ``` bash
45+ ./kubectl-windows-debug < node-name>
46+ ```
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ # default image
34image=" ghcr.io/jsturtevant/windows-debug:v0.1.1"
5+
6+ POSITIONAL=()
7+ while [[ $# -gt 0 ]]
8+ do
9+ key=" $1 "
10+
11+ case $key in
12+ -h|--help)
13+ echo " Windows node access via kubectl"
14+ echo " "
15+ echo " kubectl windows-debug [options]"
16+ echo " "
17+ echo " options:"
18+ echo " -h, --help Show brief help"
19+ echo " -i, --image use custom image"
20+ exit 0
21+ ;;
22+ -i | --image)
23+ image=" $2 "
24+ shift # past argument
25+ shift # past value
26+ ;;
27+ * ) # unknown option
28+ POSITIONAL+=(" $1 " )
29+ shift # past argument
30+ ;;
31+ esac
32+ done
33+ set -- " ${POSITIONAL[@]} " # restore positional parameters
434nodename=" $1 "
535
6- if [[ " $( basename " $0 " ) " == kubectl-* ]]; then # invoked as plugin
7- echo " Running as plugin"
8- fi
36+ echo " Running on node '$nodename ' with image '$image '"
937
1038# sometime ns default is empty from this command so default if it is
1139namespace=$( kubectl config view --minify --output ' jsonpath={..namespace}' )
You can’t perform that action at this time.
0 commit comments