This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 4. Developer CLI Operations
4.1. Overview 링크 복사링크가 클립보드에 복사되었습니다!
This topic provides information on the developer CLI operations and their syntax. You must setup and login with the CLI before you can perform these operations.
The developer CLI uses the oc
command, and is used for project-level operations. This differs from the administrator CLI, which uses the oc adm
command for more advanced, administrator operations.
4.2. Common Operations 링크 복사링크가 클립보드에 복사되었습니다!
The developer CLI allows interaction with the various objects that are managed by OpenShift Container Platform. Many common oc
operations are invoked using the following syntax:
oc <action> <object_type> <object_name>
$ oc <action> <object_type> <object_name>
This specifies:
-
An
<action>
to perform, such asget
ordescribe
. -
The
<object_type>
to perform the action on, such asservice
or the abbreviatedsvc
. -
The
<object_name>
of the specified<object_type>
.
For example, the oc get
operation returns a complete list of services that are currently defined:
oc get svc
$ oc get svc
NAME LABELS SELECTOR IP PORT(S)
docker-registry docker-registry=default docker-registry=default 172.30.78.158 5000/TCP
kubernetes component=apiserver,provider=kubernetes <none> 172.30.0.2 443/TCP
kubernetes-ro component=apiserver,provider=kubernetes <none> 172.30.0.1 80/TCP
The oc describe
operation can then be used to return detailed information about a specific object:
Versions of oc
prior to 3.0.2.0 did not have the ability to negotiate API versions against a server. So if you are using oc
up to endif::openshift-origin[][]