Administrator CLI Operations

    You are viewing documentation for a release that is no longer supported. The latest supported version of version 3 is [3.11]. For the most recent version 4, see

    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 command is used for starting services that make up the OKD 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 , 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 OKD. Many common oc adm operations are invoked using the following syntax:

    This specifies:

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

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

    1. $ oc adm new-project <project_name>

    policy

    Manages authorization policies:

      groups

      Manages groups:

      1. $ oc adm groups

      Install CLI Operations

      router

      Installs a router:

      1. $ ocadm router <router_name>

      ipfailover

      Installs an IP failover group for a set of nodes:

      1. $ oc adm ipfailover <ipfailover_config>

      registry

      Installs an integrated container registry:

      1. $ oc adm registry

      Outputs the inputs and dependencies of any builds:

      manage-node

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

      prune

      Removes older versions of resources from the server:

      1. $ oc adm prune

      Settings CLI Operations

      config

      Changes kubelet configuration files:

      1. $ oc adm config <subcommand>

      create-kubeconfig

      1. $ oc adm create-kubeconfig

      create-api-client-config

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

      1. $ oc adm create-api-client-config

      Creates a bootstrap project template:

      1. $ oc adm create-bootstrap-project-template

      create-bootstrap-policy-file

      Creates the default bootstrap policy:

      create-login-template

      Creates a login template:

      1. $ oc adm create-login-template

      overwrite-policy

      Resets the policy to the default values:

      1. $ oc adm overwrite-policy

      create-node-config

      Creates a configuration bundle for a node:

      1. $ oc adm create-node-config

      ca

      Manages certificates and keys:

      1. $ oc adm ca

      Other CLI Operations

      Displays the version of the indicated object:

      help

      Displays help about any command: