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.
k
orkubectl
: The officialkubectl
tool made by Official Kubernetes, you also could usek
as its short version. They come with intelligent auto-completion! Just hit to 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.
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
- 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.
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.
Contributions are welcome! If you have any suggestions, feature requests, or bug reports, please open an issue or submit a pull request.
This project is licensed under the MIT License.