We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 87e12d4 + 6ea3133 commit 928a5c8Copy full SHA for 928a5c8
kubectl-ssh-jump
@@ -128,7 +128,23 @@ run_ssh_node(){
128
r=$(kubectl get pod sshjump 2>/dev/null | tail -1 | awk '{print $1}') #
129
if [ "${r}" != "sshjump" ];then
130
echo "Creating SSH jump host (Pod)..."
131
- kubectl run sshjump --image=corbinu/ssh-server --port=22 --restart=Never
+ cat <<EOF | kubectl apply -f -
132
+apiVersion: v1
133
+kind: Pod
134
+metadata:
135
+ name: sshjump
136
+ labels:
137
+ env: test
138
+spec:
139
+ containers:
140
+ - name: sshjump
141
+ image: corbinu/ssh-server
142
+ ports:
143
+ - containerPort: 22
144
+ nodeSelector:
145
+ "kubernetes.io/os": linux
146
+EOF
147
+
148
# Wait until sshjump gets ready
149
c=1
150
while [[ ${c} -le ${MAX_POD_CREATION_TIME} ]];
0 commit comments