kubectl exec: Running Commands in Pods

Let's run different commands in the Pod in this lesson.

We'll cover the following

Another way to introspect a running Pod is to log in to it or execute commands in it. You can do both of these with the kubectl exec command. The following example shows how to execute a ps aux command in the first container in the hello-pod Pod.

Get hands-on with 1200+ tech skills courses.