The container is running, but you need to see inside. You type the command, and nothing happens. Then you realize: it’s an OpenShift TTY problem.
OpenShift TTY access is the simplest way to open an interactive shell to a pod. It lets you run commands, debug applications, and inspect environments in real time. In Kubernetes, this is done with kubectl exec -it. In OpenShift, you use oc rsh or oc exec with the -t (TTY) flag for interactive mode. This flag allocates a terminal session inside the container. Without it, commands run non-interactively and you lose the ability to navigate like you would in a normal shell.
A TTY session is required for programs that expect a terminal, like bash or vi. When you connect without one, output may break, interactive prompts fail, or keyboard input behave incorrectly. This is why the -t option in OpenShift CLI matters.
To open an OpenShift TTY session:
oc exec -it <pod-name> -- /bin/bash
Or, for the default container in the pod: