semvec/pypi-packages huggingface dataset:
rke2-kubeconfig 1.0.0
Fetch and merge RKE2 kubeconfig with custom naming
License: BSD-3-Clause
Keywords: kubeconfig, rke2, cli

# rke2-kubeconfig

A CLI tool to fetch RKE2 kubeconfig from a remote node, rename clusters/contexts/users with custom naming, merge into your local kubeconfig, and optionally test connectivity.

### Features

- 🔧 **Automatic Fetch**: Retrieve RKE2 kubeconfig over SSH.
- 🛠️ **Custom Naming**: Override cluster, context, and user names.
- 📂 **Secure Merge**: Merge into any kubeconfig file with unique entries.
- 💾 **Backup**: Optional automatic backups of existing configs.
- 🚀 **Test Connectivity**: Run `kubectl get nodes` to verify context.
- 📋 **Interactive CLI**: Rich `--help`, `--version`, and verbose modes.

### Installation

```console
pip install rke2-kubeconfig
```

Or install from source:

```console
git clone https://github.com/chris17453/rke2-kubeconfig.git
cd rke2-kubeconfig
pip install .
```

### Usage

```console
rke2-kubeconfig <host>[@<user>] [SSH_KEY] [options]
```

```console
# Merge using SSH agent with default 'root' user
rke2-kubeconfig 10.0.0.140 --test

# Specify user, key, and custom name with verbose output
rke2-kubeconfig admin@10.0.0.140 ~/.ssh/id_rsa.pem -n prod-node -v
```

For full list of options:

```console
rke2-kubeconfig --help
```