Skip to content

Commit

Permalink
Update README.md: Install it as a kubectl plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
spideyz0r committed Jun 15, 2024
1 parent 0743d3c commit d717167
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,28 @@ Usage: kube-knife [-dhs] [-C value] [-c value] [-m value] [-n value] [-p value]
-s, --skip-filter skip filtering, does not use regex
```

## Install it as a `kubectl knife` plugin:
1 Download or compile the binary
2 Rename it to kubectl-knife
3 Make sure the binary is included in your $PATH
```
$ kubectl knife -h
Usage: kubectl-knife [-dhs] [-C value] [-c value] [-m value] [-n value] [-p value] [-S value] [parameters ...]
-C, --command=value
command to run, if empty, just list pods
-c, --context=value
context regex
-d, --debug debug mode
-h, --help display this help
-m, --max-concurrency=value
max concurrency, default: 10
-n, --namespace=value
namespace regex
-p, --pod=value pod regex
-S, --shell=value default: sh
-s, --skip-filter skip filtering, does not use regex
```

## TODO
- Improve pod listing output, and make it more useful
- Dynamically tries /bin/sh, /bin/dash, /bin/bash, /bin/ash ===> sh -c "ls -d /tmp" || bash -c "ls -d /tmp" || ash -c "ls -d /tmp" || dash -c "ls -d /tmp"
Expand Down

0 comments on commit d717167

Please sign in to comment.