KubeGreen is a terminal-based Kubernetes management tool that provides an interactive interface for common Kubernetes operations.
-
Context Management:
- List available Kubernetes contexts
- Switch between contexts easily
- View current context
-
Pod Management:
- List all pods across namespaces
- View detailed pod information:
- Status
- Ready state
- Restart count
- Age
- Node allocation
-
Certificate Management:
- View TLS certificates
- Check expiration dates
- Monitor certificate status
- Renew certificates
- View certificate details including serial numbers
-
Volume Management:
- List all Persistent Volume Claims (PVCs)
- Delete PVCs safely with:
- Automatic deployment scaling
- Pod termination handling
- Safe cleanup process
- Go 1.22 or higher
- Access to a Kubernetes cluster
kubectl
configured with proper contexts
# Clone the repository
git clone https://github.com/yourusername/kubegreen.git
cd kubegreen
# Build the project
go build -o kubegreen cmd/main.go
# Run the application
./kubegreen
Navigate through the interface using:
- Arrow keys (↑/↓) or
j
/k
to move up/down Enter
to selectBackspace
to go backq
to quitEsc
to cancel current operation
- Select "contexts" from the main menu
- View available contexts
- Select a context to switch to it
- Confirmation will be shown
- Select "pod" from the main menu
- View list of all pods with:
- Namespace
- Name
- Ready status
- Current state
- Restart count
- Age
- Select a pod to view detailed information
- Select "certificates" from the main menu
- View list of certificates with:
- Namespace
- Name
- Days until expiration
- Current status
- Select a certificate to:
- View detailed information
- Renew if needed
- Select "volumes" from the main menu
- View list of PVCs with:
- Namespace
- Name
- Size
- Status
- Select a volume to delete
- Confirm deletion
- System will:
- Scale down related deployments
- Wait for pod termination
- Delete the PVC
- Show operation progress
kubegreen/
├── cmd/
│ └── main.go # Application entry point
├── internal/
│ ├── controller/ # Kubernetes operations
│ │ ├── contexts.go # Context management
│ │ ├── pods.go # Pod operations
│ │ ├── certificates.go # Certificate handling
│ │ └── volume_controller.go # Volume operations
│ └── model/ # UI models and state management
├── go.mod # Go module file
└── README.md # This file
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Bubble Tea for terminal UI
- Uses the official Kubernetes Go client