Skip to content

Latest commit

Β 

History

History
83 lines (59 loc) Β· 2.08 KB

File metadata and controls

83 lines (59 loc) Β· 2.08 KB

Change Kube Config (ckc)

A beautiful terminal UI tool for quickly switching between Kubernetes clusters in Rancher environments.

ckc demo

Features

  • 🎨 Beautiful terminal UI with colorful cluster display
  • πŸ” Secure credential storage with AES encryption
  • πŸ”„ Automatic token refresh and session management
  • ⚑ Fast cluster switching with interactive selection
  • 🎯 Simple keyboard navigation (↑/↓ or j/k)
  • πŸ’Ύ Persistent configuration with automatic kubeconfig updates

Prerequisites

  • Go 1.16 or higher
  • Access to a Rancher instance
  • Valid Rancher credentials

Installation

# Clone the repository
git clone https://github.com/devsymo/ckc.git
cd ckc

# Build the binary (linux)
GOOS=linux GOARCH=amd64 go build -o ckc main.go

# Optional: Move to your PATH
sudo mv ckc /usr/local/bin/

`

Usage

Simply run the command:

ckc

On first run, you'll be prompted to enter:

  • Rancher URL (e.g., https://rancher.example.com)
  • Username
  • Password

These credentials are encrypted and stored locally in ~/.ckc_config.

Navigation

  • ↑/↓ or j/k - Navigate through clusters
  • Enter - Select and switch to cluster
  • q or Ctrl+C - Quit

Configuration File

Configuration is stored in ~/.ckc_config:

{
  "rancher_url": "https://rancher.example.com",
  "username": "your-username",
  "encrypted_password": "base64-encrypted-string",
  "token": "rancher-api-token",
  "token_expiry": 1234567890
}

Dependencies

Note: While passwords are encrypted, they can be decrypted on the same machine by the same user. For production environments, consider using external secret management solutions.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.