Oc exec

From NovaOrdis Knowledge Base
Revision as of 18:17, 21 November 2017 by Ovidiu (talk | contribs) (→‎Overview)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Internal

Overview

Execute a command in a container.

oc exec [options] <pod-name> [-c <container-id>] -- command [args ...]

Example - execute an interactive shell into the container:

oc exec <pod-name> -i -t /bin/bash

Also see oc rsh.