mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 10:31:35 +00:00
kubernetes: ssh_into_kubelet.sh for Linux
Only with networking in bridge (or probably tap) modes, not user mode. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
9f04b403e4
commit
7d7001c573
@ -1,9 +1,18 @@
|
|||||||
#!/bin/bash -eux
|
#!/bin/bash -eu
|
||||||
ssh="docker run --rm -ti \
|
|
||||||
-v $HOME/.ssh/:/root/.ssh \
|
sshopts="-o LogLevel=FATAL \
|
||||||
ijc25/alpine-ssh \
|
-o StrictHostKeyChecking=no \
|
||||||
-o LogLevel=FATAL \
|
-o UserKnownHostsFile=/dev/null \
|
||||||
-o StrictHostKeyChecking=no \
|
-o IdentitiesOnly=yes"
|
||||||
-o UserKnownHostsFile=/dev/null \
|
|
||||||
-o IdentitiesOnly=yes"
|
case $(uname -s) in
|
||||||
$ssh -t root@"$1" ctr exec --tty --exec-id ssh kubelet ash -l
|
Linux)
|
||||||
|
ssh=ssh
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ssh="docker run --rm -ti \
|
||||||
|
-v $HOME/.ssh/:/root/.ssh \
|
||||||
|
ijc25/alpine-ssh"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
$ssh $sshopts -t root@"$1" ctr exec --tty --exec-id ssh kubelet ash -l
|
||||||
|
Loading…
Reference in New Issue
Block a user