Skip to content

Commit

Permalink
fix: README formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeD authored and AustralEpitech committed Jun 18, 2024
1 parent ac5bfb0 commit 2f2b78d
Showing 1 changed file with 23 additions and 19 deletions.
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

0 comments on commit 2f2b78d

Please sign in to comment.