Skip to content

siakhooi/shed

Repository files navigation

Shed

Introduction

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:
    • shed-init 📚 - when the shell session started.
    • shed-use 📚- when switch to different Shed using command shed-use📚.
    • shed-kubeconfig-use 📚 - when switch to different KubeConfig using commands shed-kubeconfig-use 📚, c0, c1, c2, c3, c4.
  • Support kubectl with shortened alias, ie k📚, k-sh📚, k-bash📚, k-scale📚, k-logs-f📚, k-logs-p📚, ka📚, kd📚, k-secret-decode📚.
  • Support helm with shortened alias, ie h📚.
  • Support istioctl with shortened alias, ie i📚.
  • 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.

Documentation

shed-use-shed-kubectl

Quick Start

Pre-requisite

Installation

$ 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

Initial Setup

  • 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.

Using Shed

  • you can then start using Shed:
    • start with shed-use📚.
    • optionally c0📚, c1, etc.
    • then k get po📚, or h list📚, etc.

Deployments

Tester Images

Badges

GitHub Code Style: Google GitHub last commit GitHub tag (latest by date) GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests GitHub top language GitHub language count Lines of code GitHub repo size GitHub code size in bytes

Workflow workflow workflow workflow

Release GitHub release (latest by date) GitHub all releases GitHub Release Date

Generic badge Generic badge count