This guide covers how to install and set up kubectl-multi on your system.
# Clone the repository
git clone <repository-url>
cd kubectl-multi
# Build and install as kubectl plugin
make install
# Or install system-wide
make install-system
# Build binary
make build
# Copy to PATH
cp bin/kubectl-multi ~/.local/bin/
chmod +x ~/.local/bin/kubectl-multi
# Verify installation
kubectl plugin list | grep multi
# Install directly with Go
go install <repository-url>@latest
# Make sure your GOPATH/bin is in your PATH
export PATH=$PATH:$(go env GOPATH)/bin
After installation, verify that the plugin is working correctly:
# Check if kubectl recognizes the plugin
kubectl plugin list | grep multi
# Test basic functionality
kubectl multi get nodes
# Check version (if implemented)
kubectl multi version
kubectl-multi uses your existing kubectl configuration. Make sure you have:
~/.kube/config)The plugin needs the following permissions on your ITS cluster:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kubectl-multi-reader
rules:
- apiGroups: ["cluster.open-cluster-management.io"]
resources: ["managedclusters"]
verbs: ["get", "list"]
And on managed clusters:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kubectl-multi-reader
rules:
- apiGroups: [""]
resources: ["*"]
verbs: ["get", "list"]
- apiGroups: ["apps"]
resources: ["*"]
verbs: ["get", "list"]
# Add other API groups as needed
Error: unknown command "multi" for "kubectl"
Solution:
kubectl-multi and is in your PATHkubectl plugin list to verify the plugin is detectedpermission denied: kubectl-multi
Solution:
chmod +x /path/to/kubectl-multi
go: module not found
Solution:
# Ensure Go modules are initialized
go mod tidy
go mod download
Error: failed to connect to ITS cluster
Solution:
kubectl get nodesIf you’re building from source, you may need additional tools:
# Install make (if not available)
# On macOS
brew install make
# On Ubuntu/Debian
apt-get install build-essential
# On CentOS/RHEL
yum groupinstall "Development Tools"
To update kubectl-multi to the latest version:
# Pull latest changes
git pull origin main
# Rebuild and install
make install
To remove kubectl-multi:
# Find the plugin location
which kubectl-multi
# Remove the binary
rm /path/to/kubectl-multi
# Or if installed via make
make uninstall
After successful installation: