Updated kube-ssh to use alpine
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
c991af3e0f
commit
88474c7831
@ -66,29 +66,7 @@ if [[ "$NODE" == "" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
NODE_NAME=$(kubectl get node $NODE -o template --template='{{index .metadata.labels "kubernetes.io/hostname"}}')
|
NODE_NAME=$(kubectl get node $NODE -o template --template='{{index .metadata.labels "kubernetes.io/hostname"}}')
|
||||||
NODE_SELECTOR='"nodeSelector": { "kubernetes.io/hostname": "'${NODE_NAME}'" },'
|
NODE_SELECTOR='"nodeSelector": { "kubernetes.io/hostname": "'${NODE_NAME}'" },'
|
||||||
|
|
||||||
kubectl run --namespace ${NAMESPACE} $POD --restart=Never -it --rm --image overriden --overrides '
|
kubectl run --namespace ${NAMESPACE} $POD --rm -it --image alpine --privileged --overrides '{"spec":{'"${NODE_SELECTOR}"'"hostPID": true}}' --command nsenter -- --mount=/proc/1/ns/mnt -- /bin/bash
|
||||||
{
|
|
||||||
"spec": {
|
|
||||||
"hostPID": true,
|
|
||||||
"hostNetwork": true,
|
|
||||||
'"${NODE_SELECTOR}"'
|
|
||||||
"tolerations": [{
|
|
||||||
"operator": "Exists"
|
|
||||||
}],
|
|
||||||
"containers": [
|
|
||||||
{
|
|
||||||
"name": "kube-ssh",
|
|
||||||
"image": "averagemarcus/kube-ssh:latest",
|
|
||||||
"stdin": true,
|
|
||||||
"tty": true,
|
|
||||||
"securityContext": {
|
|
||||||
"privileged": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}' --attach
|
|
||||||
|
Loading…
Reference in New Issue
Block a user