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

fix: README formatting #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Add the following to your `.bashrc/.zshrc` file:
`.zshrc` file:

```sh
function kubectl() { echo "+ kubectl $@">&2; command kubectl $@; }
function kubectl() { echo "+ kubectl $@" >&2; command kubectl "$@"; }
```

#### Fish
Expand All @@ -83,31 +83,35 @@ instead of aliases, so that pressing space shows the full command before executi

### Syntax explanation

* **`k`**=`kubectl`
* **`sys`**=`--namespace kube-system`
* **`k`**: `kubectl`
* **`sys`**: `--namespace kube-system`
* commands:
* **`g`**=`get`
* **`d`**=`describe`
* **`rm`**=`delete`
* **`a`**:`apply -f`
* **`ak`**:`apply -k`
* **`k`**:`kustomize`
* **`g`**: `get`
* **`d`**: `describe`
* **`rm`**: `delete`
* **`a`**: `apply -f`
* **`ak`**: `apply -k`
* **`k`**: `kustomize`
* **`ex`**: `exec -i -t`
* **`lo`**: `logs -f`
* resources:
* **`po`**=pod, **`dep`**=`deployment`, **`ing`**=`ingress`,
**`svc`**=`service`, **`cm`**=`configmap`, **`sec`**=`secret`,
**`ns`**=`namespace`, **`no`**=`node`
**:warning: Please do not suggest new resources here, instead fork the project.**
* resources: **:warning: Please do not suggest new resources here, instead fork the project.**
* **`po`**: `pod`
* **`dep`**: `deployment`
* **`ing`**: `ingress`
* **`svc`**: `service`
* **`cm`**: `configmap`
* **`sec`**: `secret`
* **`ns`**: `namespace`
* **`no`**: `node`
* flags:
* output format: **`oyaml`**, **`ojson`**, **`owide`**
* **`all`**: `--all` or `--all-namespaces` depending on the command
* **`sl`**: `--show-labels`
* **`w`**=`-w/--watch`
* **`w`**: `-w/--watch`
* value flags (should be at the end):
* **`n`**=`-n/--namespace`
* **`f`**=`-f/--filename`
* **`l`**=`-l/--selector`
* **`n`**: `-n/--namespace`
* **`f`**: `-f/--filename`
* **`l`**: `-l/--selector`

### Running the script

Expand All @@ -125,7 +129,7 @@ python generate_aliases.py fish > .kubectl_aliases.fish

- **Doesn't this slow down my shell start up?** Sourcing the file that contains
~500 aliases takes about 30-45 milliseconds in my shell (zsh). I don't think
it's a big deal for me. Measure it with `echo $(($(date +%s%N)/1000000))`
it's a big deal for me. Measure it with `echo $(($(date '+%s%N') / 1000000))`
command yourself in your .bashrc/.zshrc.

- **Can I add more Kubernetes resource types to this?** Please consider forking
Expand Down