This topic provides information on the administrator CLI operations and their syntax. You must setup and login with the CLI before you can perform these operations.

The openshift command is used for starting services that make up the OpenShift Container Platform cluster. For example, openshift start [master|node]. However, it is also an all-in-one command that can perform all the same actions as the oc and oc adm commands via openshift cli and openshift admin respectively.

The administrator CLI differs from the normal set of commands under the developer CLI, which uses the oc command, and is used more for project-level operations.

Common Operations

The administrator CLI allows interaction with the various objects that are managed by OpenShift Container Platform. Many common oc adm operations are invoked using the following syntax:

$ oc adm <action> <option>

This specifies:

  • An <action> to perform, such as new-project or groups.

  • An available <option> to perform the action on as well as a value for the option. Options include --output.

When running oc adm commands, you should run them only from the first master listed in the Ansible host inventory file, by default /etc/ansible/hosts.

Basic CLI Operations


Creates a new project:

$ oc adm new-project <project_name>


Manages authorization policies:

$ oc adm policy


Manages groups:

$ oc adm groups

Install CLI Operations


Installs a router:

$ oc adm router <router_name>


Installs an IP failover group for a set of nodes:

$ oc adm ipfailover <ipfailover_config>


Installs an integrated container image registry:

$ oc adm registry

Maintenance CLI Operations


Outputs the inputs and dependencies of any builds:

$ oc adm build-chain <image_stream>[:<tag>]


Manages nodes. For example, list or evacuate pods, or mark them ready:

$ oc adm manage-node


Removes older versions of resources from the server:

$ oc adm prune

Settings CLI Operations


Changes kubelet configuration files:

$ oc adm config <subcommand>


Creates a basic .kubeconfig file from client certificates:

$ oc adm create-kubeconfig


Creates a configuration file for connecting to the server as a user:

$ oc adm create-api-client-config

Advanced CLI Operations


Creates a bootstrap project template:

$ oc adm create-bootstrap-project-template


Creates the default bootstrap policy:

$ oc adm create-bootstrap-policy-file


Creates a login template:

$ oc adm create-login-template


Creates a configuration bundle for a node:

$ oc adm create-node-config


Manages certificates and keys:

$ oc adm ca