Skip to content

avisi-cloud/acloud-toolkit

Repository files navigation

acloud-toolkit

Build Status Go Report Card License

Our powerful CLI toolkit for Kubernetes automation and repetitive tasks, specializing in CSI snapshot management, volume migration, and storage.

✨ Features

  • Snapshot Management: Create, restore, import, and list CSI snapshots
  • Volume Migration: Migrate volumes between storage classes
  • Volume Sync: Synchronize data between persistent volumes
  • Volume Resize: Easily resize persistent volumes
  • Storage Cleanup: Prune orphaned volumes and snapshots

🚀 Quick Start

Installation

From Homebrew (macOS/Linux) (Recommended)

brew install avisi-cloud/tools/acloud-toolkit --cask

From Release

Download the latest release from the Releases page and extract it. Then copy the binary to the desired location, e.g. /usr/local/bin.

From Source

git clone https://github.com/avisi-cloud/acloud-toolkit.git
cd acloud-toolkit
make build
sudo cp bin/acloud-toolkit /usr/local/bin/acloud-toolkit

Verify Installation

acloud-toolkit version

📖 Usage Examples

Snapshot Operations

Create a snapshot

# Create snapshot from a PVC
acloud-toolkit snapshot create my-snapshot --pvc my-pvc

# Create snapshots for all PVCs in the namespace "my-namespace" with a prefix "backup":
acloud-toolkit snapshot create --all --namespace my-namespace --prefix backup

Restore from snapshot

# Restore to new PVC
acloud-toolkit snapshot restore my-snapshot \
  --restore-pvc-name my-pvc \
  --restore-storage-class ebs-restore

Import external snapshots

# Import AWS EBS snapshot
acloud-toolkit snapshot import \
  snap-1234567890abcdef0 \
  --name my-imported-snapshot

Storage Management

Prune orphaned resources

acloud-toolkit volumes prune                    # Preview what will be deleted
acloud-toolkit volumes prune --dry-run=false    # Execute cleanup

🤝 Contributing

Development Setup

git clone https://github.com/avisi-cloud/acloud-toolkit.git
cd acloud-toolkit
make test
make build

Running Tests

make test          # Unit tests
make lint          # Code linting
make race          # Race condition detection

Generate Documentation

go run tools/docs.go

📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

A CLI tool to aid in the automation of common and repetitive Kubernetes tasks

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages