Skip to content

tgruenert/tgruenert-dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Summary for tgrunert-dotfiles

Small tools for shell to make k8s admin life easier. Most solutions tested with Ubuntu and Git Bash for Windows.

Usage

  1. Checkout this repo into ~/tgruenert-dotfiles.

  2. Define auto startup

Add

source ~/tgruenert-dotfiles/startdotfiles.sh

at end of your ~/.bashrc

  1. Use it

Start a new shell and use it. See separate chapters for functions.

Functions

multi-cluster-config

Config files in a directory will collected and added to $KUBECONFIG at startup shell. So adding and removing file is enough. No more merge of "master-config" needed. Credits to https://github.com/GeertJohan/kube-multi-config

Tools will create ~/.kube-multi directory. Put your cluster configfiles into this directory and restart your shell. kubectl will recognize the new files. To remove config-files just remove it from this directory. kubectl will recognize this immediately.

If you use Lens

  • go to File > Preferences > Kubernetes
  • press "Sync folder(s)
  • select ~/.kube and ~/.kube-multi Now Lens can detect all your config files.

For a shared directory of kubectl configs also directory ~/.kube-shared is supported.

kubectl alias

'k' set as alias for kubectl and enable bash completion with 'tab'

Credits

Most of thees snippets are collected from other authors.

https://github.com/GeertJohan/kube-multi-config

About

dotfiles for k8s admin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages