HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

kubectl exec — Execute a command in a container. More information: <https://kubernetes.io/docs/reference/kubectl/ge

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandexecutekubectl execclimoreinformationcontainer

Problem

How to use the kubectl exec command: Execute a command in a container. More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_exec/>.

Solution

kubectl exec — Execute a command in a container. More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_exec/>.

Open Bash in a pod, using the first container by default:
kubectl exec {{pod_name}} {{[-it|--stdin --tty]}} -- bash

Code Snippets

Open Bash in a pod, using the first container by default

kubectl exec {{pod_name}} {{[-it|--stdin --tty]}} -- bash

Context

tldr-pages: common/kubectl exec

Revisions (0)

No revisions yet.