kubectl-aliases
ohmyzsh
Our great sponsors
kubectl-aliases | ohmyzsh | |
---|---|---|
7 | 559 | |
3,256 | 168,701 | |
- | 0.9% | |
3.1 | 9.5 | |
5 months ago | 3 days ago | |
Shell | Shell | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
kubectl-aliases
-
☸️ Kubernetes: A Pragmatic Kubectl Aliases Collection
# autocomplete kubectl & helm source <(kubectl completion zsh) source <(helm completion zsh) alias k=kubectl # when using below aliases, print kubectl command and then execute it function kctl() { echo "+ kubectl $@" && command kubectl $@ } # add aliases collection like 'kgpo' for 'kubectl get pods` from https://github.com/ahmetb/kubectl-aliases [ ! -f ~/.kube/aliases.sh ] && curl -fsSL "https://raw.githubusercontent.com/ahmetb/kubectl-aliases/master/.kubectl_aliases" > ~/.kube/aliases.sh && sed -i -e 's/kubectl/kctl/g' ~/.kube/aliases.sh source ~/.kube/aliases.sh # set default namespace alias kn='kctl config set-context --current --namespace' # get events sorted by last timestamp alias kgel='kctl get events --sort-by=.lastTimestamp' # get events sorted by creation timestamp alias kgec='kctl get events --sort-by=.metadata.creationTimestamp' # get pod's descending events function kger() { kctl get events --sort-by=.lastTimestamp --field-selector involvedObject.name="$@" } # get 'real' all alias kgworld='kctl get $(kubectl api-resources --verbs=list --namespaced -o name | paste -sd ",")' # display all nodes resources request and limits alias kgnr="k get nodes --no-headers | awk '{print \$1}' | xargs -I {} sh -c 'echo {} ; kubectl describe node {} | grep Allocated -A 5 | grep -ve Event -ve Allocated -ve percent -ve -- ; echo '" # start a debug pod (including lots of troubleshooting tools) alias kdebug="kctl -n default run debug-$USER --rm -it --tty --image leodotcloud/swiss-army-knife:v0.12 --image-pull-policy=IfNotPresent -- bash" # get pod's containers list function kgpc() { kctl get pod -o jsonpath="{.spec.containers[*].name}" "$@" && echo "" } # ping a service, ex: 'kping whoami:8080' alias kping='kctl run httping -it --image bretfisher/httping --image-pull-policy=IfNotPresent --rm=true --' # get existing pod's yaml without forbidden fields, ex: 'kyaml pod whoami' function kyaml() { kubectl get "$@" -o yaml | kubectl-neat } # display and delete failed pods in current namespace alias krmfailed='kctl delete pods --field-selector=status.phase=Failed'
- Good and/or helpful aliases to know for CKA/CKAD/Daily use?
-
Aliasing kubectl with "kc"
I like https://github.com/ahmetb/kubectl-aliases because it helps keep the formal nomenclature in my head while providing faster terminal entry.
- What are your aliases?
- Most important discussion from KubeCon
-
Everything Useful I Know About kubectl
I would highly recommend not aliasing k to kubectl and instead get this: https://github.com/ahmetb/kubectl-aliases
- For local projects, do you change your node port range?
ohmyzsh
-
Terminal commands I use as a frontend developer
That’s the minimum terminal setup. You can modify the look and add plugins such as autocompletion to your terminal by installing ohmyzsh and using themes such as powerlevel10k. I am already using them.
-
Zshell
Somewhat related is "Oh My ZSH!" which is basically zsh on steroids, it's always one of the first things I install on a new computer. It gives things like new colors, themes, plugins, and more. Highly recommend you check it out.
https://ohmyz.sh/
-
ohmyzsh VS atuin - a user suggested alternative
2 projects | 22 Feb 2024
- Oh My Zsh
-
Weird Color Stuff In The Terminal
I had just gone through a fun tutorial for setting up oh-my-zsh with a nice color scheme from iterm2colorschemes.com and a decent prompt and I was wondering: can I make my oblique strategy look nice? how can you actually use the colors from your scheme in the output in your cli?
-
Make Your Linux Terminal Enjoyable to Use
After this you going to visit Oh-My-Zsh which is where the magic will happen.
-
Using Linux Full-Time 2 years later
after automating my dotfiles, I want to automate my installations, after that I want to make my terminal easier to use so I add OMZ with many plugins, after that, I try to automate the backup of my setting on my Gnome but failed, then try using git-lfs for my big files but it turned out to be idiotic moves, bla bla bla many try and fail.
- Enchula Mi Consola
-
Pimp your CLI
ZShell is an alternative to bash a.k.a. "Bourne-Again SHell". It does everything that bash does and just like Tmux it is extensible via a healthy plugin ecosystem. By this point I hope you have already tried to run zsh on your terminal. At first it won't look like much has changed but with the right plugins this can become your best friend on the command line. The first thing we need to do is to install oh-my-zsh, a framework on top of zsh that manages configs, plugins, themes, and more.
-
10 Must-Have Tools for Programmers
Download: https://ohmyz.sh/
What are some alternatives?
kube-ps1 - Kubernetes prompt info for bash and zsh
oh-my-posh - The most customisable and low-latency cross platform/shell prompt renderer
metallb - A network load-balancer implementation for Kubernetes using standard routing protocols
starship - ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
konfig - konfig helps to merge, split or import kubeconfig files
oh-my-bash - A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
ingress - WIP Caddy 2 ingress controller for Kubernetes
powerlevel10k - A Zsh theme
kutectl - A couple of bash aliases and functions to make your life easier when dealing with kubectl.
oh-my-fish - The Fish Shell Framework
kubectl-tmux-exec - A kubectl plugin to control multiple pods simultaneously using Tmux
spaceship-prompt - :rocket::star: Minimalistic, powerful and extremely customizable Zsh prompt