A kubectl plugin to SSH into Kubernetes nodes within separate tmux panes
kubectl krew install cssh
If you'd like to install the plugin manually, simply add
kubectl-cssh to your
$PATH. For more information about how plugins are loaded, please see the official documentation.
git clone [email protected]:containership/kubectl-cssh.git ~/.kube/plugins/kubectl-cssh
> kubectl cssh --help Allows users to SSH into Kubernetes nodes by opening a new tmux pane for each matching node Options: -a, --address-type='ExternalIP': Node address type to query for (e.g. InternalIP/ExternalIP) -i, --identity-file='': Selects a file from which the identity (private key) for public key authentication is read -l, --selector='': Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2) -p, --port='': SSH port -u, --username='': SSH Username Usage: kubectl cssh [flags] [options]
SSH into all nodes in the cluster:
SSH into master nodes only:
kubectl cssh -l node-role.kubernetes.io/master=""
SSH into master nodes in private network topologies:
kubectl cssh -l "kubernetes.io/role=master" -a "InternalIP"
Thank you for your interest in this project and for your interest in contributing! Feel free to open issues for feature requests, bugs, or even just questions - we love feedback and want to hear from you.
Pull requests are also always welcome! However, if the feature you're considering adding is fairly large in scope, please consider opening an issue for discussion first. See CONTRIBUTING.md for more details.