Shed is a collection of bash scripts to manage kubernetes environments. If you work with several clusters/namespaces frequently, Shed is suitable to you.
What is the meaning of Shed? In Kubernetes, we treat resources as cattles, and cattles live in shed.
Terminology:
Shed: Can be a cluster, a collection of clusters, a namespace or a collection of namespaces.
KubeConfig: a combination or a kubectl context and/or namespace.
Features:
- Supports up to 5 KubeConfig per shed📚.
- Able to work with different Shed📚 and/or KubeConfig📚 in different shell sessions.
- Auto include kubectl config file into
KUBECONFIG
environment on start up 📚. - Modified shell prompt for better visibility of which Shed/KubeConfig the shell session is working on.
- Hooks to extends shed functionalities on:
- Support
kubectl
with shortened alias, iek
📚,k-sh
📚,k-bash
📚,k-scale
📚,k-logs-f
📚,k-logs-p
📚,ka
📚,kd
📚,k-secret-decode
📚. - Support
helm
with shortened alias, ieh
📚. - Support
istioctl
with shortened alias, iei
📚. - Print out the actual command that is executing.
Current Development Environment:
- Shed is currently developed in Github Codespace and tested with official Ubuntu and Debian images from Docker Hub.
- yq https://github.com/mikefarah/yq
- kubectl https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/
- helm https://helm.sh/docs/intro/install/ - optional.
- istioctl https://istio.io/latest/docs/setup/getting-started/ - optional.
$ sudo curl -L https://siakhooi.github.io/apt/siakhooi-apt.list | sudo tee /etc/apt/sources.list.d/siakhooi-apt.list > /dev/null
$ sudo curl -L https://siakhooi.github.io/apt/siakhooi-apt.gpg | sudo tee /usr/share/keyrings/siakhooi-apt.gpg > /dev/null
$ sudo apt update
$ sudo apt install siakhooi-shed
$ echo 'source /usr/lib/shed/shed-init' >> ~/.bashrc
- restart shell session.
- run
shed-config-edit
📚 to update the Shed config file. You can also use your favourite text editor to edit~/.shed/config.yaml
📚 directly. - Optionally, put kubectl config files in
~/.shed/kubectl-config
📚, restart shell if you do this. You can skip this step if you have setup the kubectl configs.
- you can then start using Shed: