Skip to content

Tiny plugin for connecting to node in the cluster over SSH

License

Notifications You must be signed in to change notification settings

kvaps/kubectl-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

kubectl-ssh

Tiny plugin for connecting to node in the cluster over SSH.

Features

  • Getting IP-address of the node from the API.
  • Setting username and ssh options per context.

Installation

curl -LO https://github.com/kvaps/kubectl-ssh/raw/master/kubectl-ssh
chmod +x ./kubectl-ssh
sudo mv ./kubectl-ssh /usr/local/bin/kubectl-ssh

Usage

kubectl ssh <node>

Configuration

# Set username
echo 'USERNAME=user' >> ~/.kube/ssh-config

# Set options
echo 'SSH_OPTIONS="-o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"' >> ~/.kube/ssh-config

# Set username for specific context
echo 'STAGE_USERNAME=user' >> ~/.kube/ssh-config

# Set options for specific context
echo 'STAGE_SSH_OPTIONS="-o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"' >> ~/.kube/ssh-config

About

Tiny plugin for connecting to node in the cluster over SSH

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages