Skip to content

Commit 928a5c8

Browse files
authored
Merge pull request #9 from swgriffith/master
Fix to address pod sshjump pod scheduling on hybrid clusters
2 parents 87e12d4 + 6ea3133 commit 928a5c8

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

kubectl-ssh-jump

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,23 @@ run_ssh_node(){
128128
r=$(kubectl get pod sshjump 2>/dev/null | tail -1 | awk '{print $1}') #
129129
if [ "${r}" != "sshjump" ];then
130130
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+
132148
# Wait until sshjump gets ready
133149
c=1
134150
while [[ ${c} -le ${MAX_POD_CREATION_TIME} ]];

0 commit comments

Comments
 (0)