Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add usage examples #2

Open
displague opened this issue Jul 30, 2020 · 0 comments
Open

Add usage examples #2

displague opened this issue Jul 30, 2020 · 0 comments

Comments

@displague
Copy link

displague commented Jul 30, 2020

The README could use some examples. I've included a few that I found useful.

Here's an example of installing dssh without git, using keys that are already associated with your Github profile:

# GHUSER is your github username
$ curl -so- https://github.com/GHUSER.keys | kubectl create configmap root-ssh-pubkeys -n kube-system --from-file /dev/stdin
configmap/root-ssh-pubkeys created

$ kubectl apply -f https://raw.githubusercontent.com/asauber/dssh/master/daemonset.yaml
daemonset.apps/root-ssh-manager created

$ ssh [email protected]
Linux lke123-123-123b31337123 5.7.0-1-cloud-amd64 #1 SMP Debian 5.7.6-1 (2020-06-24) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@lke123-123-123b31337123:~#

This could be handy when wanting to run the same command on all nodes:

$ for ip in $(kubectl get nodes -o jsonpath='{ $.items[*].status.addresses[?(@.type=="ExternalIP")].address }'); do \
 ssh root@$ip hostname; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant