This commit is contained in:
Rob Vadai 2025-11-21 19:32:38 +01:00 committed by GitHub
commit da2fadb4a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 122 additions and 120 deletions

View file

@ -12,7 +12,7 @@ plugins=(... kubectl)
## Aliases ## Aliases
| Alias | Command | Description | | Alias | Command | Description |
| :------- | :------------------------------------------------------ | :----------------------------------------------------------------------------------------------- | | :------------ | :------------------------------------------------------ | :----------------------------------------------------------------------------------------------- |
| k | `kubectl` | The kubectl command | | k | `kubectl` | The kubectl command |
| kca | `kubectl --all-namespaces` | The kubectl command targeting all namespaces | | kca | `kubectl --all-namespaces` | The kubectl command targeting all namespaces |
| kaf | `kubectl apply -f` | Apply a YML file | | kaf | `kubectl apply -f` | Apply a YML file |
@ -38,6 +38,7 @@ plugins=(... kubectl)
| kep | `kubectl edit pods` | Edit pods from the default editor | | kep | `kubectl edit pods` | Edit pods from the default editor |
| kdp | `kubectl describe pods` | Describe all pods | | kdp | `kubectl describe pods` | Describe all pods |
| kdelp | `kubectl delete pods` | Delete all pods matching passed arguments | | kdelp | `kubectl delete pods` | Delete all pods matching passed arguments |
| kclearevicted | *(complex)* | Delete all pods with Evicted status across all namespaces. |
| | | **Service management** | | | | **Service management** |
| kgs | `kubectl get svc` | List all services in ps output format | | kgs | `kubectl get svc` | List all services in ps output format |
| kgsw | `kgs --watch` | After listing all services, watch for changes | | kgsw | `kgs --watch` | After listing all services, watch for changes |

View file

@ -51,6 +51,7 @@ alias kep='kubectl edit pods'
alias kdp='kubectl describe pods' alias kdp='kubectl describe pods'
alias kdelp='kubectl delete pods' alias kdelp='kubectl delete pods'
alias kgpall='kubectl get pods --all-namespaces -o wide' alias kgpall='kubectl get pods --all-namespaces -o wide'
alias kclearevicted="kubectl get pods --all-namespaces -o json | jq '.items[] | select(.status.reason!=null) | select(.status.reason | contains(\"Evicted\")) | \"kubectl delete pods \(.metadata.name) -n \(.metadata.namespace)\"' | xargs -n 1 bash -c"
# Service management. # Service management.
alias kgs='kubectl get svc' alias kgs='kubectl get svc'