Skip to content

nithu0115/kubectl-ssh-plugin-eks

Repository files navigation

Kubectl plugin to SSH into EKS Worker Nodes

This plugin will provide an easy way to SSH into Kubernetes Worker nodes running and have joined the Amazon EKS cluster using kubectl.

Prerequisite

To use the plugin you should have kubectl version 1.10 and above.

Installation on Linux/Mac

mkdir -p ~/.kube/plugins
git clone https://github.com/nithu0115/kubectl-ssh-plugin-eks.git

Usage

You should have a ssh key pair in your ~/.ssh/ directory and you will be able to use this plugin to ssh into the Worker nodes which are part of the Cluster.

kubectl plugin ssh <worker node name>

To pass an ssh key, please use -i flag that will append the proper identity file.

kubectl plugin ssh <worker node name> -i ~/.ssh/Nithish.pem

To see the full usage of the SSH plugin, please use --help flag to print the following.

Usage:
  kubectl plugin ssh <worker node name> [options]

Opens up an SSH connection to the node that you pass into the command, allowing you to work faster without writing out the full ssh command.

Options:
  -p, --cloud-provider='aws': Use this flag if you are using AWS EKS
  -i, --identity-file='~/.ssh/id_rsa': Identity file to use to ssh into the instance.
  -l, --selector='': Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
  -u, --ssh-user='ec2-user': Login user to be used for the ssh command.


Use "kubectl options" to list global command-line options (applies to all commands).

Roadmap

  • Add support to SSHing into worker nodes from Windows machine.

About

This is plugin to SSH into Worker Nodes running on AWS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages