Answers for "kubectl exec command pod"

0

kubectl exec

kubectl exec -it <pod-name> -n <namespace> -- <command>

example:
--------
kubectl exec -it tag-mgmt -n my-namespace -- /bin/sh
kubectl exec -it timescaledb -n data-store -- psql

timescaledb -> is pod name 
data-store -> is namespace
psql -> is command that we can run for postgres
Posted by: Guest on September-06-2021
0

kubectl exec run command inside pod

kubectl exec pod_name -- sh -c "some_shell_code_run_inside_pod"
Posted by: Guest on January-21-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language