kubectl-ssh-plugin-eks
kubectl-ssh-plugin-eks copied to clipboard
This is plugin to SSH into Worker Nodes running on AWS
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
[source,shell]
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.
[source,shell]
kubectl plugin ssh
To pass an ssh key, please use -i flag that will append the proper identity file.
[source,shell]
kubectl plugin ssh -i ~/.ssh/Nithish.pem
To see the full usage of the SSH plugin, please use --help flag to print the following.
[source,shell]
Usage:
kubectl plugin ssh
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 nodesfrom Windows machine.