“Kubectl Exec Bash” Kod odpowiedzi

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

Odpowiedzi podobne do “Kubectl Exec Bash”

Pytania podobne do “Kubectl Exec Bash”

Więcej pokrewnych odpowiedzi na “Kubectl Exec Bash” w Shell/Bash

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu