Quick Start Guide¶
This guide will help you get started with K8sTool quickly.
Prerequisites¶
Before installing K8sTool, ensure you have:
1. Kubernetes cluster configured
2. kubectl
installed and configured
3. Optional: metrics-server installed (for resource metrics)
See Prerequisites for detailed requirements.
Installation¶
# Download latest release
curl -LO https://github.com/k8stool/k8stool/releases/latest/download/k8stool
# Make executable
chmod +x k8stool
# Move to PATH
sudo mv k8stool /usr/local/bin/
Basic Usage¶
View Pods¶
See Pods for more details.View Logs¶
See Logs for more details.Forward Ports¶
# Forward port to pod
k8stool port-forward pod nginx 8080:80
k8stool pf pod nginx 8080:80
# Forward port to deployment
k8stool port-forward deployment nginx 8080:80
k8stool pf deploy nginx 8080:80
# Interactive mode with guided setup
k8stool pf -i
# Forward using UDP protocol
k8stool pf pod nginx 8080:80 --protocol=udp
View Metrics¶
See Metrics for more details.Manage Contexts¶
k8stool ctx current # Show current context
k8stool ctx list # List all contexts
k8stool ctx switch # Interactive context switch
Manage Namespaces¶
k8stool ns # Show current namespace
k8stool ns list # List all namespaces
k8stool ns -i # Interactive namespace switch
k8stool ns <name> # Switch to namespace directly