Answers for "kubectl exec"

2

kubectl exec bash

kubectl exec --stdin --tty shell-demo -- /bin/bash
Posted by: Guest on January-06-2021
4

kubernetes /bin/bash

sudo kubectl -n <namespace> --context=<context-with-access> exec <pod-name> -it /bin/bash

ex:
sudo kubectl -n default --context=staging-devops exec microservice1-jd830k-880 -it /bin/bash
Posted by: Guest on March-02-2020
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
2

kubectl exec ls -lah

kubectl exec <pod_name> -- ls -la /
Posted by: Guest on March-11-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language