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.Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 5. Administrator CLI Operations
5.1. Overview Link kopierenLink in die Zwischenablage kopiert!
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.
5.2. Common Operations Link kopierenLink in die Zwischenablage kopiert!
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>
$ oc adm <action> <option>
This specifies:
-
An
<action>
to perform, such asnew-project
orgroups
. -
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.
5.3. Basic CLI Operations Link kopierenLink in die Zwischenablage kopiert!
5.3.1. new-project Link kopierenLink in die Zwischenablage kopiert!
Creates a new project:
oc adm new-project <project_name>
$ oc adm new-project <project_name>
5.3.2. policy Link kopierenLink in die Zwischenablage kopiert!
Manages authorization policies:
oc adm policy
$ oc adm policy
5.3.3. groups Link kopierenLink in die Zwischenablage kopiert!
Manages groups:
oc adm groups
$ oc adm groups
5.4. Install CLI Operations Link kopierenLink in die Zwischenablage kopiert!
5.4.1. router Link kopierenLink in die Zwischenablage kopiert!
Installs a router:
ocadm router <router_name>
$ ocadm router <router_name>
5.4.2. ipfailover Link kopierenLink in die Zwischenablage kopiert!
Installs an IP failover group for a set of nodes:
oc adm ipfailover <ipfailover_config>
$ oc adm ipfailover <ipfailover_config>
5.4.3. registry Link kopierenLink in die Zwischenablage kopiert!
Installs an integrated container registry:
oc adm registry
$ oc adm registry
5.5. Maintenance CLI Operations Link kopierenLink in die Zwischenablage kopiert!
5.5.1. build-chain Link kopierenLink in die Zwischenablage kopiert!
Outputs the inputs and dependencies of any builds:
oc adm build-chain <image_stream>[:<tag>]
$ oc adm build-chain <image_stream>[:<tag>]
5.5.2. manage-node Link kopierenLink in die Zwischenablage kopiert!
Manages nodes. For example, list or evacuate pods, or mark them ready:
oc adm manage-node
$ oc adm manage-node
5.5.3. prune Link kopierenLink in die Zwischenablage kopiert!
Removes older versions of resources from the server:
oc adm prune
$ oc adm prune
5.6. Settings CLI Operations Link kopierenLink in die Zwischenablage kopiert!
5.6.1. config Link kopierenLink in die Zwischenablage kopiert!
Changes kubelet configuration files:
oc adm config <subcommand>
$ oc adm config <subcommand>
5.6.2. create-kubeconfig Link kopierenLink in die Zwischenablage kopiert!
Creates a basic .kubeconfig file from client certificates:
oc adm create-kubeconfig
$ oc adm create-kubeconfig
5.6.3. create-api-client-config Link kopierenLink in die Zwischenablage kopiert!
Creates a configuration file for connecting to the server as a user:
oc adm create-api-client-config
$ oc adm create-api-client-config
5.7. Advanced CLI Operations Link kopierenLink in die Zwischenablage kopiert!
5.7.1. create-bootstrap-project-template Link kopierenLink in die Zwischenablage kopiert!
Creates a bootstrap project template:
oc adm create-bootstrap-project-template
$ oc adm create-bootstrap-project-template
5.7.2. create-bootstrap-policy-file Link kopierenLink in die Zwischenablage kopiert!
Creates the default bootstrap policy:
oc adm create-bootstrap-policy-file
$ oc adm create-bootstrap-policy-file
5.7.3. create-login-template Link kopierenLink in die Zwischenablage kopiert!
Creates a login template:
oc adm create-login-template
$ oc adm create-login-template
5.7.4. overwrite-policy Link kopierenLink in die Zwischenablage kopiert!
Resets the policy to the default values:
oc adm overwrite-policy
$ oc adm overwrite-policy
5.7.5. create-node-config Link kopierenLink in die Zwischenablage kopiert!
Creates a configuration bundle for a node:
oc adm create-node-config
$ oc adm create-node-config
5.7.6. ca Link kopierenLink in die Zwischenablage kopiert!
Manages certificates and keys:
oc adm ca
$ oc adm ca
5.8. Other CLI Operations Link kopierenLink in die Zwischenablage kopiert!
5.8.1. version Link kopierenLink in die Zwischenablage kopiert!
Displays the version of the indicated object:
oc adm version
$ oc adm version
5.8.2. help Link kopierenLink in die Zwischenablage kopiert!
Displays help about any command:
oc adm help <command>
$ oc adm help <command>