Skip to main content

Fetch and merge RKE2 kubeconfig with custom naming

Project description

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

pip install rke2-kubeconfig

Or install from source:

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

Usage

rke2-kubeconfig <host>[@<user>] [SSH_KEY] [options]
# 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:

rke2-kubeconfig --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rke2_kubeconfig-1.0.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rke2_kubeconfig-1.0.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file rke2_kubeconfig-1.0.0.tar.gz.

File metadata

  • Download URL: rke2_kubeconfig-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for rke2_kubeconfig-1.0.0.tar.gz
Algorithm Hash digest
SHA256 41b7dd175e2bbac2f17b23ebd50e8ddff8d16e3b285e7599d95ffd82f1500697
MD5 737f56cd652414295f5b77c72dc17e2c
BLAKE2b-256 3e83c44137aeaa036c36ecb9b67d8a2472a38f8c90f9026300f5429fd9db772e

See more details on using hashes here.

File details

Details for the file rke2_kubeconfig-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for rke2_kubeconfig-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4de487dd0e119e929e6873c449d20a9a7213f88328c012502110cc6cc7953aa
MD5 ee4b59d6010aed120d3b1d047a9a0fd6
BLAKE2b-256 a7c9a2e1765f7da3f4a77b9cb98a90ae6821074210874e558032df70aac145eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page