“Kubectl Exec Bash” Ответ

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
Glamorous camel

kubectl Exec ls -lah

kubectl exec <pod_name> -- ls -la /
Google's Top Recommendation

Kubectl Exec Bash

kubectl exec --stdin --tty shell-demo -- /bin/bash
Blushing Buffalo

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
Google's Top Recommendation

Ответы похожие на “Kubectl Exec Bash”

Вопросы похожие на “Kubectl Exec Bash”

Больше похожих ответов на “Kubectl Exec Bash” по Shell/Bash

Смотреть популярные ответы по языку

Смотреть другие языки программирования