Kubekit fast kubernetes cli operations
Managing Kubernetes clusters, contexts, and namespaces can be time-consuming. But fear not! I’ve got you covered with three KubeKit smart tools: k
, kc
, and kn
. These tools will streamline your workflow and make your life easier.
TL;DR
Full KubeKit installation:
curl -sL https://github.com/nh4ttruong/kubekit/raw/main/install.sh | sudo bash -s -- -a
Features
k
orkubectl
: The officialkubectl
tool made by Official Kubernetes, you also could usek
as its short version. They come with intelligent auto-completion! Just hitto see the magic happen. kc
: Easily to switch between cluster contexts with a shorter aliaskc
. Typekc
instead of the full command to get all contexts with current highlighting context.kn
: Need to get all namepsaces or switch between cluster namespaces? No problem!kn
is your fast lane.
Installation
To install KubeKit, follow these steps:
- Install
kubectl
only:curl -sL https://github.com/nh4ttruong/kubekit/raw/main/install.sh | sudo bash
- Install
kubectl
withkc
(context) andkn
(namespace) aliases operations:- Linux (bash):
curl -sL https://github.com/nh4ttruong/kubekit/raw/main/install.sh | sudo bash -s -- -a
- MacOS (zsh):
curl -sL https://github.com/nh4ttruong/kubekit/raw/main/install.sh | sudo zsh -s -- -a
- Linux (bash):
- Manual install from repository:
git clone https://github.com/nh4ttruong/kubekit.git cd kubekit bash ./install.sh -a
The -a
or --alias
option is optional and allows you to install quick aliases for context kc
and namespace kn
operations.
Usage
Once installed, you can use KubeKit to enhance your Kubernetes workflow:
- Use
k
as short version ofkubectl
: - Use
kc
to manage Kubernetes contexts:kc
: List available contextskc <context-name>
: Switch to the specified context
- Use
kn
to manage Kubernetes namespaces:kn
: List available namespaceskn <namespace-name>
: Switch to the specified namespace
For more information on KubeKit usage, refer to run kc -h
and kn -h
for help.
Reference
Contributing
Contributions are welcome! If you have any suggestions, feature requests, or bug reports, please open an issue or submit a pull request.