A Python CLI tool that lists Kubernetes pods organized by nodegroup across different cloud providers (AWS EKS, GCP GKE, Azure AKS).
- Multi-cloud support: Detects and displays nodegroups from AWS EKS, GCP GKE, and Azure AKS
- Interactive mode: Displays a menu of available nodegroups for selection
- Non-interactive mode: Supports command-line arguments for filtering and automation
- Rich output: Colorful, well-formatted tables showing pod details
- Filtering options: Filter by nodegroup, namespace, or both
- Pod status information: Shows ready status (e.g., "2/3") and container state with appropriate colors
pip install kgnggit clone https://github.com/example/kgng.git
cd kgng
pip install -e .- Python 3.8 or higher
kubectlcommand-line tool configured with access to your Kubernetes cluster- Active Kubernetes context pointing to your cluster
# Show all pods grouped by nodegroup (interactive mode by default)
kgng
# Show pods in a specific nodegroup
kgng --nodegroup my-nodegroup
# Show pods in a specific namespace
kgng --namespace kube-system
# Show pods in a specific nodegroup and namespace
kgng --nodegroup my-nodegroup --namespace kube-system
# Force non-interactive mode (show all pods by default)
kgng --no-prompt--nodegroup: Filter pods by specific nodegroup--namespace: Filter pods by specific namespace--prompt: Force interactive mode--no-prompt: Force non-interactive mode (show all pods by default)--version: Display version information
When run without arguments, kgng enters interactive mode:
Available nodegroups:
1. standard-nodes (10 pods)
2. high-memory-nodes (5 pods)
3. gpu-nodes (3 pods)
4. All nodegroups (18 pods)
Select a nodegroup (1-4, or q to quit): ┌─────────────────────────────────────────────────────────────────────────────┐
│ Nodegroup: standard-nodes │
├───────────────┬───────────────────┬──────────┬────────┬────────────────────┤
│ Pod Name │ Namespace │ Status │ Ready │ Node │
├───────────────┼───────────────────┼──────────┼────────┼────────────────────┤
│ nginx-abc123 │ default │ Running │ 1/1 │ ip-10-0-1-100.ec2… │
│ web-xyz456 │ web-frontend │ Running │ 2/2 │ ip-10-0-1-101.ec2… │
│ redis-def789 │ cache │ Running │ 1/1 │ ip-10-0-1-102.ec2… │
└───────────────┴───────────────────┴──────────┴────────┴────────────────────┘- kubectl not found: Ensure kubectl is installed and in your PATH
- Permission errors: Make sure your kubectl context has sufficient permissions
- No nodegroups detected: Verify that your nodes have the appropriate labels for nodegroup detection
For more detailed output, use the --debug flag:
kgng --debugContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
// Made with Bob