https://github.com/ralgozino/oh-my-kustomize
Oh My ZSH Kustomize Plugin
https://github.com/ralgozino/oh-my-kustomize
Last synced: 8 months ago
JSON representation
Oh My ZSH Kustomize Plugin
- Host: GitHub
- URL: https://github.com/ralgozino/oh-my-kustomize
- Owner: ralgozino
- License: mit
- Created: 2022-10-27T08:06:11.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-17T07:11:59.000Z (over 1 year ago)
- Last Synced: 2025-03-20T16:47:48.168Z (8 months ago)
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - kustomize - Adds tab completions for [kustomize](https://kustomize.io/) (Completions / ZSH on Windows)
- fucking-awesome-zsh-plugins - kustomize - Adds tab completions for 🌎 [kustomize](kustomize.io/) (Completions / ZSH on Windows)
README
# Kustomize Oh My ZSH Plugin
This [Oh My ZSH](https://ohmyz.sh/) plugin adds completion for [Kustomize, the Kubernetes native configuration management tool](https://kustomize.io/), as well as some useful aliases for common commands.
To use this plugin:
1. Install the plugin:
```bash
git clone https://github.com/ralgozino/oh-my-kustomize ~/.oh-my-zsh/plugins/kustomize
```
or in your custom plugins folder:
```bash
git clone https://github.com/ralgozino/oh-my-kustomize ~/.oh-my-zsh/custom/plugins/kustomize
```
2. Add `kustomize` to the plugins array in your `.zshrc` file:
```zsh
plugins=(... kustomize)
```
3. Open a new shell or source your `.zshrc` file.
> 💡 Notice that Kustomize changed the command to generate the command completinos in v3.8.6.
>
> For versions 3.8.5 or earlier you'll need to activate the command completion manualy by running:
>
> ```bash
> kustomize install-completions
> ```
## Aliases
| Alias | Command | Description |
| :------- | :----------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------- |
| `kz` | `kustomize` | Runs kustomize, you can pass the subcomands you want, i.e. `kz build` |
| `kzb` | `kustomize build` | Runs kustoimze build, you can pass more flags and argunments to the command, like the folder. |
| `kzby` | `kustomize build \| yh` | Will run kustomize build and pipe the output to `yh` for YAML formatting. |
| `kzba` | `kustomize build \| kubectl apply -f -` | Will run kustomize build and pipe the output to `kubectl apply`. |
| `kzbas` | `kustomize build \| kubectl apply -f - --server-side` | Will run kustomize build and pipe the output to `kubectl apply --server-side`. |
| `kzbasf` | `kustomize build \| kubectl apply -f - --server-side --force-conflicts` | Will run kustomize build and pipe the output to `kubectl apply --server-side --froce-conflicts`. |
| `kzbdel` | `kustomize build \| kubectl delete -f - ` | Will run kustomize build and pipe the output to `kubectl delete`. |
| `kzc` | `kustomize create` | Runs `kustomize create` |
| `kzca` | `kustomize create` | Runs `kustomize create --autodetect` |
| `kzcar` | `kustomize create` | Runs `kustomize create --autodetect --recursive` |
| `kze` | `kustomize edit` | Runs `kustomize edit` |
| `kzv` | `kustomize version` | Runs `kustomize version` |
## Honorable mention
This plugin is heavily based on the [official oh-my-zsh `kubectl` plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/kubectl).