From the course: Kubernetes Essential Training: Application Development
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Remotely executing commands - Kubernetes Tutorial
From the course: Kubernetes Essential Training: Application Development
Remotely executing commands
- If the logs aren't enough, you might want to just log in like the olden days. And for that, we can say kubectl exec dash ti, because we want to interact with this shell, I basically says, take the input from my terminal and send it to the pod. T says, take the pod's output and send it back to my terminal. And we'll go for blue again. Now it's telling me I need to provide a command because we're not shelling in with this. There's no SSH server running in the container waiting for us. Exec is a really low level command that lets us directly run a program that's in the container image. So we have to give a path within the container image, you know, within the container's file system to a program we want to run, so bin sh is the shell. Now what we're getting is bin sh no such file or directory. And this is because my container image, and I can confirm this because I made it doesn't actually have a shell in it. In…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.