mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-24 17:28:40 +00:00
Add kube-shell script, for running shell commands in a deployed container
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
09f38bbd16
commit
a4169f1007
1 changed files with 11 additions and 0 deletions
11
script/kube-shell
Executable file
11
script/kube-shell
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ $# < 1 ]]; then
|
||||
echo "Usage: $0 [production|staging|...]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export ZED_KUBE_NAMESPACE=$1
|
||||
|
||||
pod=$(kubectl --namespace=${ZED_KUBE_NAMESPACE} get pods --selector=app=zed --output=jsonpath='{.items[*].metadata.name}')
|
||||
exec kubectl --namespace $ZED_KUBE_NAMESPACE exec --tty --stdin $pod -- /bin/bash
|
Loading…
Reference in a new issue