IuryAlves / kubectl-ssh

A kubectl plugin to ssh into a pod's node
MIT License
9 stars 0 forks source link
kubectl kubectl-plugins kubernetes

kubectl ssh

ssh into a pod's node

asciicast

Installing

Important: kubectl 1.15 or greater is required

curl -fsS -o /usr/local/bin/kubectl-ssh \
    https://raw.githubusercontent.com/IuryAlves/kubectl-ssh/master/kubectl-ssh && \
        chmod +x /usr/local/bin/kubectl-ssh

make sure that /usr/local/bin is in your path.

Usage

kubectl ssh <pod_name>
kubectl ssh <pod_name> --user=root

This is equivalent to ssh root@<ip>

kubectl ssh <pod_name> -i /path/to/my/indetity-file

This is equivalent to: ssh <ip> -i /path/to/my/indetity-file