// Module included in the following assemblies: // // * cli_reference/openshift_cli/developer-cli-commands.adoc [id="cli-application-management-commands_{context}"] = Application management CLI commands == annotate Update the annotations on one or more resources. .Example: Add an annotation to a Route [source,terminal] ---- $ oc annotate route/test-route haproxy.router.openshift.io/ip_whitelist="192.168.1.10" ---- .Example: Remove the annotation from the Route [source,terminal] ---- $ oc annotate route/test-route haproxy.router.openshift.io/ip_whitelist- ---- == apply Apply a configuration to a resource by file name or standard in (stdin) in JSON or YAML format. .Example: Apply the configuration in `pod.json` to a Pod [source,terminal] ---- $ oc apply -f pod.json ---- == autoscale Autoscale a DeploymentConfig or ReplicationController. .Example: Autoscale to a minimum of two and maximum of five Pods [source,terminal] ---- $ oc autoscale deploymentconfig/parksmap-katacoda --min=2 --max=5 ---- == create Create a resource by file name or standard in (stdin) in JSON or YAML format. .Example: Create a Pod using the content in `pod.json` [source,terminal] ---- $ oc create -f pod.json ---- == delete Delete a resource. .Example: Delete a Pod named `parksmap-katacoda-1-qfqz4` [source,terminal] ---- $ oc delete pod/parksmap-katacoda-1-qfqz4 ---- .Example: Delete all Pods with the `app=parksmap-katacoda` label [source,terminal] ---- $ oc delete pods -l app=parksmap-katacoda ---- == describe Return detailed information about a specific object. .Example: Describe a Deployment named `example` [source,terminal] ---- $ oc describe deployment/example ---- .Example: Describe all Pods [source,terminal] ---- $ oc describe pods ---- == edit Edit a resource. .Example: Edit a DeploymentConfig using the default editor [source,terminal] ---- $ oc edit deploymentconfig/parksmap-katacoda ---- .Example: Edit a DeploymentConfig using a different editor [source,terminal] ---- $ OC_EDITOR="nano" oc edit deploymentconfig/parksmap-katacoda ---- .Example: Edit a DeploymentConfig in JSON format [source,terminal] ---- $ oc edit deploymentconfig/parksmap-katacoda -o json ---- == expose Expose a Service externally as a Route. .Example: Expose a Service [source,terminal] ---- $ oc expose service/parksmap-katacoda ---- .Example: Expose a Service and specify the host name [source,terminal] ---- $ oc expose service/parksmap-katacoda --hostname=www.my-host.com ---- == get Display one or more resources. .Example: List Pods in the `default` namespace [source,terminal] ---- $ oc get pods -n default ---- .Example: Get details about the `python` DeploymentConfig in JSON format [source,terminal] ---- $ oc get deploymentconfig/python -o json ---- == label Update the labels on one or more resources. .Example: Update the `python-1-mz2rf` Pod with the label `status` set to `unhealthy` [source,terminal] ---- $ oc label pod/python-1-mz2rf status=unhealthy ---- == scale Set the desired number of replicas for a ReplicationController or a DeploymentConfig. .Example: Scale the `ruby-app` DeploymentConfig to three Pods [source,terminal] ---- $ oc scale deploymentconfig/ruby-app --replicas=3 ---- == secrets Manage secrets in your project. .Example: Allow `my-pull-secret` to be used as an image pull secret by the `default` service account [source,terminal] ---- $ oc secrets link default my-pull-secret --for=pull ---- == serviceaccounts Get a token assigned to a service account or create a new token or `kubeconfig` file for a service account. .Example: Get the token assigned to the `default` service account [source,terminal] ---- $ oc serviceaccounts get-token default ---- == set Configure existing application resources. .Example: Set the name of a secret on a BuildConfig [source,terminal] ---- $ oc set build-secret --source buildconfig/mybc mysecret ----