KubeDeckio / KubeTidy

KubeTidy - A PowerShell tool for cleaning up Kubernetes kubeconfig files by removing unreachable clusters, users, and contexts. Simplify your multi-cluster Kubernetes management with ease. Supports exclusion lists, automated backups, and a detailed summary report. Available on the PowerShell Gallery.
http://kubetidy.io/
MIT License
26 stars 3 forks source link

KubeTidy


Publish Module to PowerShell Gallery Publish Plugin to Krew PowerShell Gallery Version Downloads Krew Version License


KubeTidy is a PowerShell tool designed to clean up your Kubernetes configuration file by removing unreachable clusters, along with associated users and contexts. It simplifies the management of your kubeconfig by ensuring that only reachable and valid clusters remain, making it easier to work with multiple Kubernetes environments. KubeTidy also supports merging multiple kubeconfig files into one.

Documentation

For complete installation, usage, and advanced configuration instructions, please visit the KubeTidy Documentation Site.

Features

Installation

PowerShell Gallery

To install KubeTidy via PowerShell Gallery:

Install-Module -Name KubeTidy -Repository PSGallery -Scope CurrentUser

Krew (Linux and macOS)

To install KubeTidy as a kubectl plugin using Krew:

# Fetch the latest release tag using GitHub's API
LATEST_VERSION=$(curl -s https://api.github.com/repos/KubeDeckio/KubeTidy/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')

# Download the KubeTidy.yaml file from the latest release
curl -L -H "Cache-Control: no-cache" -O https://github.com/KubeDeckio/KubeTidy/releases/download/$LATEST_VERSION/KubeTidy.yaml

# Install the plugin using the downloaded KubeTidy.yaml file
kubectl krew install --manifest="./KubeTidy.yaml"

Platform Support

Please note that KubeTidy installed via Krew is supported only on Linux and macOS. It does not support Windows at this time.

For additional instructions, refer to the KubeTidy Documentation Site.

Changelog

All notable changes to this project are documented in the CHANGELOG.

License

This project is licensed under the MIT License. See the LICENSE file for more details.