Skip to content

Commit e95247d

Browse files
authored
Merge pull request #24 from yokawasa/nodeselector-amd64
Add amd64 to nodeSelector in default Pod template
2 parents 0ff2324 + da2e858 commit e95247d

File tree

3 files changed

+13
-103
lines changed

3 files changed

+13
-103
lines changed

CHANGELOG.md

-62
This file was deleted.

README.md

+11-40
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ Here is an scenario where you want to connect to Kubernetes nodes or remote serv
3333
- [How to use](#how-to-use)
3434
- [Usage](#usage)
3535
- [Option parameters Cache](#option-parameters-cache)
36-
- [SSH Agent (ssh-agent)](#ssh-agent-ssh-agent)
36+
- [SSH Agent ssh-agent](#ssh-agent-ssh-agent)
3737
- [Customize SSH jump pod](#customize-ssh-jump-pod)
3838
- [Examples](#examples)
3939
- [CASE 1: SSH into Kubernetes nodes via SSH jump Pod](#case-1-ssh-into-kubernetes-nodes-via-ssh-jump-pod)
40-
- [1-1 - You have private & public SSH key on your side](#1-1---you-have-private--public-ssh-key-on-your-side)
41-
- [1-2 - You have .pem file but you don't have public key on your side](#1-2---you-have-pem-file-but-you-dont-have-public-key-on-your-side)
40+
- [-1 - You have private & public SSH key on your side](#-1---you-have-private--public-ssh-key-on-your-side)
41+
- [-2 - You have .pem file but you don't have public key on your side](#-2---you-have-pem-file-but-you-dont-have-public-key-on-your-side)
4242
- [CASE 2: Access remote serivces via SSH local port forwarding](#case-2-access-remote-serivces-via-ssh-local-port-forwarding)
43-
- [2-1 - Configuring SSH local port forwarding with --args or -a option](#2-1---configuring-ssh-local-port-forwarding-with---args-or--a-option)
43+
- [-1 - Configuring SSH local port forwarding with --args or -a option](#-1---configuring-ssh-local-port-forwarding-with---args-or--a-option)
4444
- [Useful Links](#useful-links)
4545
- [Contributing](#contributing)
4646

@@ -191,41 +191,12 @@ $ kubectl ssh-jump
191191
Usage:
192192
kubectl ssh-jump <dest_node> [options]
193193

194-
Options:
195-
<dest_node> Destination node name or IP address
196-
dest_node must start from the following letters:
197-
ASCII letters 'a' through 'z' or 'A' through 'Z',
198-
the digits '0' through '9', or hyphen ('-').
199-
NOTE: Setting dest_node as 'jumphost' allows to
200-
ssh into SSH jump Pod as 'root' user
201-
-u, --user <sshuser> SSH User name
202-
-i, --identity <identity_file> Identity key file, or PEM(Privacy Enhanced Mail)
203-
-p, --pubkey <pub_key_file> Public key file
204-
-P, --port <port> SSH port for target node SSH server
205-
Defaults to 22
206-
-a, --args <args> Args to exec in ssh session
207-
--pod-template <file> Path to custom sshjump pod definition
208-
--skip-agent Skip automatically starting SSH agent and adding
209-
SSH Identity key into the agent before SSH login
210-
(=> You need to manage SSH agent by yourself)
211-
--cleanup-agent Clearning up SSH agent at the end
212-
The agent is NOT cleaned up in case that
213-
--skip-agent option is given
214-
--cleanup-jump Clearning up sshjump pod at the end
215-
Defaults to skip cleaning up sshjump pod
216-
-h, --help Show this message
217-
218-
Example:
219-
Scenario1 - You have private & public SSH key on your side
220-
$ kubectl ssh-jump -u myuser -i ~/.ssh/id_rsa -p ~/.ssh/id_rsa.pub hostname
221-
222-
Scenario2 - You have .pem file but you don't have public key on your side
223-
$ kubectl ssh-jump -u ec2-user -i ~/.ssh/mykey.pem hostname
194+
...snip...
224195

225196
List of destination node...
226197
Hostname Internal-IP
227198
aks-nodepool1-18558189-0 10.240.0.4
228-
...
199+
...snip...
229200
```
230201

231202

@@ -235,13 +206,13 @@ aks-nodepool1-18558189-0 10.240.0.4
235206

236207
Suppose you have private & public SSH key on your side and you want to SSH to a node named `aks-nodepool1-18558189-0`, execute the plugin with options like this:
237208

238-
- usernaem: `myuser`
209+
- usernaem: `azureuser`
239210
- identity:`~/.ssh/id_rsa_k8s`
240211
- pubkey:`~/.ssh/id_rsa_k8s.pub`)
241212

242213
```sh
243214
$ kubectl ssh-jump aks-nodepool1-18558189-0 \
244-
-u myuser -i ~/.ssh/id_rsa_k8s -p ~/.ssh/id_rsa_k8s.pub
215+
-u azureuser -i ~/.ssh/id_rsa_k8s -p ~/.ssh/id_rsa_k8s.pub
245216
```
246217

247218
> [NOTE] you can try SSH into a node using node IP address (`Internal-IP`) instead of `Hostname`
@@ -272,15 +243,15 @@ You can clean up sshjump pod at the end of the command with `--cleanup-jump` opt
272243

273244
```sh
274245
$ kubectl ssh-jump aks-nodepool1-18558189-0 \
275-
-u myuser -i ~/.ssh/id_rsa_k8s -p ~/.ssh/id_rsa_k8s.pub \
246+
-u azureuser -i ~/.ssh/id_rsa_k8s -p ~/.ssh/id_rsa_k8s.pub \
276247
--cleanup-jump
277248
```
278249

279250
You can clean up ssh-agent at the end of the command with `--cleanup-agent` option, otherwise, the ssh-agent process stay running once it's started.
280251

281252
```sh
282253
$ kubectl ssh-jump aks-nodepool1-18558189-0 \
283-
-u myuser -i ~/.ssh/id_rsa_k8s -p ~/.ssh/id_rsa_k8s.pub \
254+
-u azureuser -i ~/.ssh/id_rsa_k8s -p ~/.ssh/id_rsa_k8s.pub \
284255
--cleanup-agent
285256
```
286257

@@ -293,7 +264,7 @@ $ eval `ssh-agent`
293264
$ ssh-add ~/.ssh/id_rsa_k8s
294265
# Then, run the plugin with --skip-agent
295266
$ kubectl ssh-jump aks-nodepool1-18558189-0 \
296-
-u myuser -i ~/.ssh/id_rsa_k8s -p ~/.ssh/id_rsa_k8s.pub \
267+
-u azureuser -i ~/.ssh/id_rsa_k8s -p ~/.ssh/id_rsa_k8s.pub \
297268
--skip-agent
298269

299270
# At the end, run this if you want to kill the current agent

kubectl-ssh-jump

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ spec:
147147
ports:
148148
- containerPort: 22
149149
nodeSelector:
150-
"kubernetes.io/os": linux
150+
kubernetes.io/os: linux
151+
kubernetes.io/arch: amd64
151152
EOF
152153
)
153154
fi

0 commit comments

Comments
 (0)