Editing Kubectl exec
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/ | https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/ | ||
* <code>[[kubectl]] exec -it my-redis-pod -- /bin/bash</code> (Get a shell to a running container (https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/)) | * <code>[[kubectl]] exec -it my-redis-pod -- /bin/bash</code> (Get a shell to a running container (https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/)) | ||
− | * <code>[[kubectl]] exec -it my-redis-pod | + | * <code>[[kubectl]] exec -it my-redis-pod -c my-redis-container -- /bin/bash</code> |
kubectl -n your_namespace exec your-pod-name1 -- bash | kubectl -n your_namespace exec your-pod-name1 -- bash | ||
Line 41: | Line 27: | ||
[[kubectl exec]] envar-demo -- [[printenv]] | [[kubectl exec]] envar-demo -- [[printenv]] | ||
− | + | == Related commands == | |
− | |||
− | |||
− | == Related == | ||
* <code>[[docker exec]]</code> | * <code>[[docker exec]]</code> | ||
* <code>[[podman exec]]</code> | * <code>[[podman exec]]</code> | ||
− | |||
* <code>[[kubectl logs]]</code> | * <code>[[kubectl logs]]</code> | ||
* <code>[[kubectl get pods]]</code> | * <code>[[kubectl get pods]]</code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Activities == | == Activities == | ||
Line 61: | Line 38: | ||
== See also == | == See also == | ||
* {{kubectl exec}} | * {{kubectl exec}} | ||
− | * {{ | + | * {{kubectl}} |
Advertising: