This is a cache of https://docs.openshift.com/container-platform/3.3/cli_reference/admin_cli_operations.html. It is a snapshot of the page at 2024-11-22T04:20:16.597+0000.
Administrator <strong>cli</strong> Operations | <strong>cli</strong> Reference | OpenShift Container Platform 3.3
×

Overview

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.

Basic cli Operations

new-project

Creates a new project:

$ oc adm new-project <project_name>

policy

Manages authorization policies:

$ oc adm policy

groups

Manages groups:

$ oc adm groups

Install cli Operations

router

Installs a router:

$ ocadm router <router_name>

ipfailover

Installs an IP failover group for a set of nodes:

$ oc adm ipfailover <ipfailover_config>

registry

Installs an integrated container registry:

$ oc adm registry

Maintenance cli Operations

build-chain

Outputs the inputs and dependencies of any builds:

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

manage-node

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

$ oc adm manage-node

prune

Removes older versions of resources from the server:

$ oc adm prune

Settings cli Operations

config

Changes kubelet configuration files:

$ oc adm config <subcommand>

create-kubeconfig

Creates a basic .kubeconfig file from client certificates:

$ oc adm create-kubeconfig

create-api-client-config

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

$ oc adm create-api-client-config

Advanced cli Operations

create-bootstrap-project-template

Creates a bootstrap project template:

$ oc adm create-bootstrap-project-template

create-bootstrap-policy-file

Creates the default bootstrap policy:

$ oc adm create-bootstrap-policy-file

create-login-template

Creates a login template:

$ oc adm create-login-template

overwrite-policy

Resets the policy to the default values:

$ oc adm overwrite-policy

create-node-config

Creates a configuration bundle for a node:

$ oc adm create-node-config

ca

Manages certificates and keys:

$ oc adm ca

Other cli Operations

version

Displays the version of the indicated object:

$ oc adm version

help

Displays help about any command:

$ oc adm help <command>