Skip to main content

CLI tool for K8sVMGr - Kubernetes VM Manager

Project description

k8s-agent

CLI tool for K8sVMGr - Kubernetes VM Manager

Installation

pip install k8s-agent

Quick Start

Authentication

# Login to your K8sVMGr account
k8s-agent login

# Check who you're logged in as
k8s-agent whoami

# Logout
k8s-agent logout

VM Management

# List all VMs
k8s-agent list

# Create a CPU VM
k8s-agent create --cpu 16

# Create a GPU VM
k8s-agent create --gpu 2 --gpu-model A800-80G-R

# Check availability before creating
k8s-agent create --gpu 4 --gpu-model A800-80G-R --check

# Delete a VM
k8s-agent delete <vm-id>

# Force delete (skip backup)
k8s-agent delete <vm-id> --force

VM Inspection

# View VM events
k8s-agent events <vm-id>

# View VM logs
k8s-agent logs <vm-id>
k8s-agent logs <vm-id> --tail 100

# View VM dashboard with visual metrics
k8s-agent dashboard <vm-id>

VM Operations

# Interconnect all running VMs for SSH access
k8s-agent interconnect

Features

  • 🔐 OAuth 2.0 Device Flow Authentication - Secure login via web browser
  • 📊 Visual Dashboard - Beautiful ASCII charts showing GPU/CPU metrics
  • 🚀 VM Lifecycle Management - Create, delete, and monitor VMs
  • 📈 Resource Monitoring - Real-time metrics with gauges and sparklines
  • 🔗 VM Interconnection - Setup SSH between VMs for distributed computing
  • 🎯 Tab Completion - Fast command completion (future feature)

Configuration

k8s-agent stores authentication tokens in ~/.k8s-agent/config.json.

You can override the API URL with the --api-url flag or set the K8S_AGENT_API_URL environment variable.

Requirements

  • Python 3.8+
  • Access to a K8sVMGr backend instance

Development

# Clone the repository
git clone https://github.com/yourusername/k8s-agent.git
cd k8s-agent

# Install in development mode
pip install -e .

# Run tests
pytest

License

MIT License

Support

For issues and feature requests, please visit: https://github.com/yourusername/k8s-agent/issues

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

k8s_agent-0.2.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

k8s_agent-0.2.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file k8s_agent-0.2.0.tar.gz.

File metadata

  • Download URL: k8s_agent-0.2.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for k8s_agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4cddda11f89d7ebfdf843c2a06ec1716f72c5a9cc05ff9ca91a7b48dc4a3d9e5
MD5 235aca67560ea86de3915fd8c741f06c
BLAKE2b-256 d45d8d88db988b1e93d5156f0abf0298828c3e6ef158b5c3dec75d5b69d45b86

See more details on using hashes here.

File details

Details for the file k8s_agent-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: k8s_agent-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for k8s_agent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f31668cb7a48e0cf2f2d29d9a4decea176359d8e3db6017cf6f9a8b15ddeb5e
MD5 1b2d742dad0933c4e9ef6eba85ef2cd5
BLAKE2b-256 8d32a55673e463e72b6ac5a69a13264a3e6b4668afd0350ad79b6ee1b0846251

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