https://github.com/gcarrarom/kubeconfig-cleaner-cli
☸️ kcleaner - a tool for your Kube config files
https://github.com/gcarrarom/kubeconfig-cleaner-cli
cli cli-tool configuration-management demo k8s kubernetes pypi-test python python3
Last synced: about 1 month ago
JSON representation
☸️ kcleaner - a tool for your Kube config files
- Host: GitHub
- URL: https://github.com/gcarrarom/kubeconfig-cleaner-cli
- Owner: gcarrarom
- License: mit
- Created: 2019-05-03T13:13:20.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-13T15:08:31.000Z (about 5 years ago)
- Last Synced: 2023-02-28T10:31:42.153Z (over 3 years ago)
- Topics: cli, cli-tool, configuration-management, demo, k8s, kubernetes, pypi-test, python, python3
- Language: Python
- Homepage: https://fancywhale.ca
- Size: 954 KB
- Stars: 31
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://codecov.io/gh/gcarrarom/kubeconfig-cleaner-cli)

# Table of contents
- [Table of contents](#table-of-contents)
- [Demo](#demo)
- [Usage](#usage)
- [Installation](#installation)
# Demo
I want to clean my Kube config file without having to open my config file ever again :)
# Usage
To use this CLI simply type:
`kcleaner`
This will prompt you to remove the context by using Fuzzy Search.
If you want to clean another Kube config file, you should use the option `-k` or `--kube-config` with the path for your config file.
If you want to remove clusters, you can too! Just call `kcleaner clusters` and voilá!
What about users? Sure can! `kcleaner users` is here to help!
To select more than one entry, just press tab. All the selected entries will be removed!
If you know the name of the config entry you're going to remove, you can always use the `-n` or `--name` option to remove it.
Here's the output of the help command `kcleaner --help`:
```
Usage: kcleaner.py [OPTIONS] [[users|clusters|contexts|token]]
A little CLI tool to help keeping Config Files clean :)
Options:
-k, --kubeconfig TEXT path to the config file to clean
-n, --name TEXT Name of the entry to remove
-u, --undo Use this to roll back latest changes
-d, --debug Use this to see debug level messages
--help Show this message and exit.
```
# Installation
To install using pip, simply run this command:
`pip install kcleaner`
## Requirements
Python 3.x