File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,24 @@ run_ssh_node(){
128
128
r=$( kubectl get pod sshjump 2> /dev/null | tail -1 | awk ' {print $1}' ) #
129
129
if [ " ${r} " != " sshjump" ]; then
130
130
echo " Creating SSH jump host (Pod)..."
131
- kubectl run sshjump --image=corbinu/ssh-server --port=22 --restart=Never
131
+ 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
+ # kubectl run sshjump --image=corbinu/ssh-server --port=22 --restart=Never
132
149
# Wait until sshjump gets ready
133
150
c=1
134
151
while [[ ${c} -le ${MAX_POD_CREATION_TIME} ]];
You can’t perform that action at this time.
0 commit comments