All Projects → Dbz → Kube Aliases

Dbz / Kube Aliases

Kubernetes Aliases and Bash Functions

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Kube Aliases

Zsh Vi Mode
💻 A better and friendly vi(vim) mode plugin for ZSH.
Stars: ✭ 181 (+352.5%)
Mutual labels:  command-line-tool, zsh, oh-my-zsh, zsh-plugin
kubeswitch
visually select kubernetes context/namespace from tree
Stars: ✭ 15 (-62.5%)
Mutual labels:  namespace, k8s, kubectl
History Sync
An oh-my-zsh plugin for GPG encrypted internet synchronised Zsh history, with Git.
Stars: ✭ 135 (+237.5%)
Mutual labels:  zsh, oh-my-zsh, zsh-plugin
Dotbare
Manage dotfiles and any git directories interactively with fzf
Stars: ✭ 327 (+717.5%)
Mutual labels:  command-line-tool, zsh, zsh-plugin
Kubefwd
Bulk port forwarding Kubernetes services for local development.
Stars: ✭ 2,713 (+6682.5%)
Mutual labels:  devops, k8s, kubectl
Zsh Nvm
Zsh plugin for installing, updating and loading nvm
Stars: ✭ 1,670 (+4075%)
Mutual labels:  zsh, oh-my-zsh, zsh-plugin
zsh-ssh-agent
Ssh-agent management for zsh
Stars: ✭ 19 (-52.5%)
Mutual labels:  zsh, oh-my-zsh, zsh-plugin
Rcli
Rapidly create full-featured command line interfaces with help, subcommand dispatch, and validation.
Stars: ✭ 9 (-77.5%)
Mutual labels:  command-line-tool, zsh, autocomplete
Zsh Z
Jump quickly to directories that you have visited "frecently." A native ZSH port of z.sh.
Stars: ✭ 562 (+1305%)
Mutual labels:  command-line-tool, zsh, zsh-plugin
Fz
Cli shell plugin, the missing fuzzy tab completion feature of z jump around command.
Stars: ✭ 359 (+797.5%)
Mutual labels:  zsh, oh-my-zsh, zsh-plugin
Maratona Kubernetes
Repositório de código de demonstrações da Maratona Kubernetes 🇧🇷
Stars: ✭ 152 (+280%)
Mutual labels:  devops, k8s, kubectl
K8s Digitalocean Terraform
Deploy latest Kubernetes cluster on DigitalOcean using Terraform
Stars: ✭ 33 (-17.5%)
Mutual labels:  devops, k8s, cluster
Terraform Eks
Terraform for AWS EKS
Stars: ✭ 82 (+105%)
Mutual labels:  devops, cluster, kubectl
kube-watch
Simple tool to get webhooks on Kubernetes cluster events
Stars: ✭ 21 (-47.5%)
Mutual labels:  cluster, namespace, k8s
Kubectl Plugins
A Collection of Plugins for kubectl Integration (exec as any user, context switching, etc).
Stars: ✭ 340 (+750%)
Mutual labels:  namespace, devops, kubectl
Zsh Autocomplete
🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
Stars: ✭ 641 (+1502.5%)
Mutual labels:  zsh, zsh-plugin, autocomplete
K8s Utils
Kubernetes Utility / Helper Scripts
Stars: ✭ 33 (-17.5%)
Mutual labels:  devops, k8s, kubectl
Sparrow
运维管理平台(python3+flask+pycharts+apscheduler+gunicorn),模块化结构设计,底层依托mysql、influxdb、elasticsearch、zabbix、k8s等数据源数据
Stars: ✭ 723 (+1707.5%)
Mutual labels:  devops, k8s
Dotfiles
Dotfiles for all :D
Stars: ✭ 700 (+1650%)
Mutual labels:  zsh, oh-my-zsh
Permission Manager
Permission Manager is a project that brings sanity to Kubernetes RBAC and Users management, Web UI FTW
Stars: ✭ 753 (+1782.5%)
Mutual labels:  namespace, k8s

kube-aliases

This is an oh-my-zsh plugin (or source kube-aliases.plugin.zsh for bash) to make working with kubernetes easier. It provides a bunch of bash aliases and zsh functions. Docs can be found here, which clarifies all aliases.

Usage

There are a few main features of this plugin. First, there are lots of aliases to make working with Kubernetes easier. Second, there are bash functions to help with varies tasks such as switching contexts to use different clusters.

Aliases

To see a full list of aliases, use

khelp usage

In general and when it makes sense, aliases follow the following conventions.

k           # kubectl
kd<r>       # kubectl delete <resource>, e.g. kgp for kubectl delete pods
kds<r>      # kubectl describe <resource>, e.g. kdsp for kubectl describe pod
ke<r>       # kubectl edit <resource>, e.g. kgp for kubectl edit pods
kg<r>       # kubectl get <resource>, e.g. kgp for kubectl get pods
kga<r>      # kubectl get --all-namespaces -o wide <resource>, e.g. kgap for kubectl --all-namespaces -o wide get pods
kl          # kubectl logs <podname>
klf         # kubectl logs -f <podname>: i.e. watch logs live

There is also some other useful commands such as the following:

kcon       # create configuration files
kdap       # delete all pods within a namespace
kdrain     # drain a node
kexec      # execute a command in a specified pod,
           # default drops user into a shell
kfind      # use a regular expression to find items across everything except
           # custom resources
kgpns      # Get just pod names in a namespace
kpfind     # Search through pods with regular expressions
krd        # restart a deployment
kstatus    # search across namespaces to find pods statuses

For a more detailed list of aliases, view the docs.

Not everything is currently implemented, but more and more is being added to the list. If something is missing that is desired, feel free to submit a pull request.

Installation

Oh-My-Zsh

git clone [email protected]:Dbz/kube-aliases.git ~/.oh-my-zsh/custom/plugins/kube-aliases
echo "plugins+=(kube-aliases)" >> ~/.zshrc

You can also manually place zsh-kuberenetes inside of plugins=(...)

If you have set the ZSH_CUSTOM environment variable in your zshrc, then you should modify the git clone directory to be $ZSH_CUSTOM/plugins/kube-aliases.

Antigen

Add antigen bundle dbz/kube-aliases to your antigen bundles in your .zshrc

Zgen

Add zgen load dbz/kube-aliases to your zgen plugins in your .zshrc

Zinit

Add zinit load Dbz/kube-aliases to your zinit plugins in your .zshrc

Bash

Source kube-aliases.plugin.zsh in your .bashrc.

Aliases for Kubernetes Extensions

kubectx

For easy context and namespace switching there is kubectx. kubectx allows users context switching, and the linked github comes with kubens which allows for simple namespace switching. You can use the following aliases:

alias kctx='kubectx'
alias kns='kubens'

Kubernetes Metrics Server

To get some metrics from nodes or pods, you can use Kubernetes Metrics Server. There are the aliases

alias kt='kubectl top'
alias ktn='kubectl top nodes'
alias ktp='kubectl top pods'

Trouble Shooting

Autocomplete

If there is problems with autocomplete, it may be that kubectl is not on the path when the plugin is loaded. To fix, load plugins after adding kubectl to path.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].