此内容没有您所选择的语言版本。

Chapter 5. Administrator CLI Operations


5.1. 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 oadm command is used for administrator CLI operations, which is a symlink that can be used on hosts that have the openshift binary, such as a master. If you are on a workstation that does not have the openshift binary, you can also use oc adm in place of oadm, if oc is available.

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

The administrator CLI allows interaction with the various objects that are managed by OpenShift Enterprise. Many common oadm operations are invoked using the following syntax:

Copy to Clipboard Toggle word wrap
$ oadm <action> <option>

This specifies:

  • An <action> to perform, such as new-project or router.
  • An available <option> to perform the action on as well as a value for the option. Options include --output.

5.3. Basic CLI Operations

5.3.1. new-project

Creates a new project:

Copy to Clipboard Toggle word wrap
$ oadm new-project <project_name>

5.3.2. policy

Manages authorization policies:

Copy to Clipboard Toggle word wrap
$ oadm policy

5.3.3. groups

Manages groups:

Copy to Clipboard Toggle word wrap
$ oadm groups

5.4. Install CLI Operations

5.4.1. router

Installs a router:

Copy to Clipboard Toggle word wrap
$ oadm router <router_name>

5.4.2. ipfailover

Installs an IP failover group for a set of nodes:

Copy to Clipboard Toggle word wrap
$ oadm ipfailover <ipfailover_config>

5.4.3. registry

Installs an integrated container registry:

Copy to Clipboard Toggle word wrap
$ oadm registry

5.5. Maintenance CLI Operations

5.5.1. build-chain

Outputs the inputs and dependencies of any builds:

Copy to Clipboard Toggle word wrap
$ oadm build-chain <image_stream>[:<tag>]

5.5.2. manage-node

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

Copy to Clipboard Toggle word wrap
$ oadm manage-node

5.5.3. prune

Removes older versions of resources from the server:

Copy to Clipboard Toggle word wrap
$ oadm prune

5.6. Settings CLI Operations

5.6.1. config

Changes kubelet configuration files:

Copy to Clipboard Toggle word wrap
$ oadm config <subcommand>

5.6.2. create-kubeconfig

Creates a basic .kubeconfig file from client certificates:

Copy to Clipboard Toggle word wrap
$ oadm create-kubeconfig

5.6.3. create-api-client-config

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

Copy to Clipboard Toggle word wrap
$ oadm create-api-client-config

5.7. Advanced CLI Operations

5.7.1. create-bootstrap-project-template

Creates a bootstrap project template:

Copy to Clipboard Toggle word wrap
$ oadm create-bootstrap-project-template

5.7.2. create-bootstrap-policy-file

Creates the default bootstrap policy:

Copy to Clipboard Toggle word wrap
$ oadm create-bootstrap-policy-file

5.7.3. create-login-template

Creates a login template:

Copy to Clipboard Toggle word wrap
$ oadm create-login-template

5.7.4. overwrite-policy

Resets the policy to the default values:

Copy to Clipboard Toggle word wrap
$ oadm overwrite-policy

5.7.5. create-node-config

Creates a configuration bundle for a node:

Copy to Clipboard Toggle word wrap
$ oadm create-node-config

5.7.6. ca

Manages certificates and keys:

Copy to Clipboard Toggle word wrap
$ oadm ca

5.8. Other CLI Operations

5.8.1. version

Displays the version of the indicated object:

Copy to Clipboard Toggle word wrap
$ oadm version

5.8.2. help

Displays help about any command:

Copy to Clipboard Toggle word wrap
$ oadm help <command>
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat, Inc.