Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

2.6. 프로젝트

OpenShift Container Platform의 프로젝트에 는 논리 애플리케이션을 구성하는 여러 오브젝트 가 포함되어 있습니다.

대부분의 oc 명령은 프로젝트 의 컨텍스트에서 실행됩니다. oc login초기 설정 중에 후속 명령에 사용할 기본 프로젝트를 선택합니다. 다음 명령을 사용하여 현재 사용 중인 프로젝트를 표시합니다.

$ oc project

여러 프로젝트에 액세스할 수 있는 경우 프로젝트 이름을 지정하여 다음 구문을 사용하여 특정 프로젝트로 전환합니다.

$ oc project <project_name>

예:

Project project02로 전환

$ oc project project02

출력 예

Now using project 'project02'.

Project 03으로전환

$ oc project project03

출력 예

Now using project 'project03'.

현재 프로젝트 나열

$ oc project

출력 예

Using project 'project03'.

oc status 명령은 다음 예와 같이 현재 사용 중인 프로젝트에 대한 높은 수준 개요와 해당 구성 요소 및 해당 관계를 표시합니다.

$ oc status

출력 예

In project OpenShift 3 Sample (test)

service database-test (172.30.17.113:6434 -> 3306)
  database-test deploys docker.io/library/mysql:latest
    #1 deployed 47 hours ago

service frontend-test (172.30.17.236:5432 -> 8080)
  frontend-test deploys origin-ruby-sample:test <-
    builds https://github.com/openshift/ruby-hello-world with docker.io/openshift/ruby-20-centos7:latest
    not built yet
    #1 deployment waiting on image

To see more information about a service or deployment config, use 'oc describe service <name>' or 'oc describe dc <name>'.
You can use 'oc get pods,svc,dc,bc,builds' to see lists of each of the types described above.