Usage of oc and kubectl commands
The oc
binary offers the same capabilities as the kubectl
binary, but it extends to natively support additional OKD features, including:
Full support for OKD resources
Resources such as
DeploymentConfig
,BuildConfig
,Route
,ImageStream
, and objects are specific to OKD distributions, and build upon standard Kubernetes primitives.Additional commands
The additional command
oc new-app
, for example, makes it easier to get new applications started using existing source code or pre-built images. Similarly, the additional commandoc new-project
makes it easier to start a project that you can switch to as your default.
Non-security API changes will involve, at minimum, two minor releases (4.1 to 4.2 to 4.3, for example) to allow older oc
binaries to update. Using new capabilities might require newer oc
binaries. A 4.3 server might have additional capabilities that a 4.2 binary cannot use and a 4.3 oc
binary might have additional capabilities that are unsupported by a 4.2 server.
X.Y ( | X.Y+N [] ( | |
X.Y (Server) | ||
X.Y+N [1] (Server) |
Fully compatible.
oc
client might not be able to access server features.
oc
client might provide options and features that might not be compatible with the accessed server.
The kubectl binary
The kubectl
binary is provided as a means to support existing workflows and scripts for new OKD users coming from a standard Kubernetes environment, or for those who prefer to use the kubectl
CLI. Existing users of kubectl
can continue to use the binary to interact with Kubernetes primitives, with no changes required to the OKD cluster.
You can install the supported binary by following the steps to Install the OpenShift CLI. The kubectl
binary is included in the archive if you download the binary, or is installed when you install the CLI by using an RPM.
For more information, see the .