Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetb authored Dec 20, 2017
1 parent bb7e195 commit bae2e85
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ and save it in your $HOME directory, then edit your .bashrc/.zshrc file with:
[ -f ~/.kubectl_aliases ] && source ~/.kubectl_aliases
```

If you want full aliases to be printed to the screen before running them,
add the following line there as well:

```sh
func kubectl(){ echo "+ kubectl $@"; command kubectl $@ }
```


### Examples

Some of the 800 generated aliases are:
Expand Down Expand Up @@ -37,24 +45,6 @@ alias kgwf='kubectl get --watch -f'

See [the full list](.kubectl_aliases).

### Enabling the debug mode

Add the following before sourcing the aliases in your .bashrc/.zshrc to
get the full `kubectl` command printed before executing it:

```sh
func kubectl() { echo $@; command kubectl $@ }
```
Example:
```sh
$ ksysgpowslowidel k8s-app=glbc
+ kubectl --namespace=kube-system get pods --watch --show-labels -o=wide -l k8s-app=glbc
NAME READY STATUS RESTARTS AGE IP
l7-default-backend-1044750973-4nr8n 1/1 Running 0 2m 10.32.1.5
```
### Syntax explanation

* **`k`**=`kubectl`
Expand Down

0 comments on commit bae2e85

Please sign in to comment.