2.3. Usage of oc and kubectl commands
The Kubernetes command-line interface (CLI), kubectl, can be used to run commands against a Kubernetes cluster. Because OpenShift Container Platform is a certified Kubernetes distribution, you can use the supported kubectl binaries that ship with OpenShift Container Platform, or you can gain extended functionality by using the oc binary.
2.3.1. The oc binary 링크 복사링크가 클립보드에 복사되었습니다!
The oc binary offers the same capabilities as the kubectl binary, but it extends to natively support additional OpenShift Container Platform features, including:
Full support for OpenShift Container Platform resources
Resources such as
DeploymentConfig,BuildConfig,Route,ImageStream, andImageStreamTagobjects are specific to OpenShift Container Platform distributions, and build upon standard Kubernetes primitives.Authentication
The
ocbinary offers a built-inlogincommand for authentication and lets you work with projects, which map Kubernetes namespaces to authenticated users. Read Understanding authentication for more information.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-projectmakes it easier to start a project that you can switch to as your default.
If you installed an earlier version of the oc binary, you cannot use it to complete all of the commands in OpenShift Container Platform 4.21 . If you want the latest features, you must download and install the latest version of the oc binary corresponding to your OpenShift Container Platform server version.
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 oc 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 [a] ( | |
| X.Y (Server) |
|
|
| X.Y+N [a] (Server) |
|
|
[a]
Where N is a number greater than or equal to 1.
| ||
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.