manage get-cr-status

Get the status of the components that are installed in the specified project (namespace).

Extended description

You can run this command to ensure that components are:
  • Installed at the correct version
  • In maintenance mode during an offline backup
  • Shut down to prevent the service from using resources

For each component, the output of the command includes the following information:

  • The custom resource kind and name
  • The timestamp when the custom resource was created
  • The project where the custom resource exists
  • The status of the custom resource
  • The current progress, as a percent
  • The message associated with the current progress
  • The version of the component from the spec section of the custom resource
  • The version in the status section after the last operator reconcile loop
  • The operator version and build number, if available

The output has the following format:

Components  CR Kind  CR Name  Creation Timestamp  Namespace  Expected Version  Reconciled Version  Operator Information  Progress  Progress Message  Reconcile History  Status 
----------  -------  -------  ------------------  ---------  ----------------  ------------------  --------------------  --------  ----------------  -----------------  --------
<ID>        <kind>   <name>   <timestamp>         <project>  <version>         <version>           <version> <build>     <%>       <message>         <details>          <status>

The following table provides more information about the statuses for each custom resource:

For more information about the statuses that are returned for each component, see Getting the status of installed components.

Syntax

cpd-cli manage get-cr-status \
[--cpd_instance_ns=<project-name>] \
[--tethered_instance_ns=<comma-separated-list-of-project-names>] \
[--cluster_component_ns=<project-name>] \
[--components=<comma-separated-list-of-component-names>] \
[--include_dependency=true|false]

Arguments

The get-cr-status command has no arguments.

Options

Table 1: Command options
Option Description
--components A comma-separated list of the components for which you want to see the status.
Status
Optional.

If you omit this option, the command gets the status of all components in the project.

Syntax
--components=<comma-separated-list-of-component-names>
Default value
There is no default value. The list depends on which components for which you want to see the status.
Valid values
For the list of components, see Component IDs.

You can specify individual components or a comma-separated list of components.

--cpd_instance_ns The project for the IBM Software Hub control plane and services.

If you specify a component that isn't in the project, the output will not include information about the component.

Status
Required if you want to get the status of a component in the operands project for an instance of Cloud Pak for Data.
Syntax
--cpd_instance_ns=<project-name>
Default value
No default. User-defined.
Valid values
The name of an existing project on the Red Hat® OpenShift® Container Platform cluster where Cloud Pak for Data is installed.
--cluster_component_ns The project where the cluster-wide component that you want to get the status of is installed.
Status
Required if you want to get the status of a cluster-wide component, such as the scheduling service.
Syntax
--cluster_component_ns=<project-name>
Default value
No default. User-defined.
Valid values
The name of an existing project on the Red Hat OpenShift Container Platform cluster where the cluster-wide component is installed.
--filter Specify the list of fields to include in the response.
Status
Optional.
Syntax
--filter=<comma-separated-list-of-field-names>
Default value
No default.

If you omit this option, all of the fields are returned.

Valid values
cr_kind
Include the kind of the custom resource.
cr_name
Include the name of the custom resource.
cr_status
Include the current value of the status field of the custom resource
creation_timestamp
Include the creation timestamp of the custom resource.
error_history
Include the last three errors from the custom resource, if available.
namespace
Include the project (namespace) where the custom resource exists.
expected_version
Include the expected version of the custom resource.
reconciled_version
Include the version returned from the custom resource
operator_info
Include information about the operator that manages the custom resource, such as the name and version, if available
progress
Include the status of installations or updates as a percentage.
progress_message
Include the message associated with the current percentage.
--include_dependency Specify whether you want to get the status of the dependencies for the specified components.
Status
Optional.

This option applies only if you specify the --components option.

Syntax
--include_dependency=true|false
Default value
false

If you omit this option, the default value is used.

Valid values
false
Do not return information about the automatically installed dependencies for the specified components.
true
Return information about the automatically installed dependencies for the specified components.
--tethered_instance_ns The tethered projects where you want to get the status of installed components.
Status
Required if you want to get the status of a component in a tethered project.
Syntax
--tethered_instance_ns=<comma-separated-list-of-project-names>
Default value
No default. User-defined.
Valid values
A comma-separated list of projects (namespaces) that are tethered to the project where IBM Software Hub is installed.

Examples

Note: The following example uses the recommended installation environment variables.

It is strongly recommended that you use a script to create environment variables with the correct values for your environment. For details, see Setting up installation environment variables.

Get the status of all components in the specified project
cpd-cli manage get-cr-status \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
Get the status of the control plane in the specified project
cpd-cli manage get-cr-status \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--components=zen
Get the status of all components in the specified tethered project
cpd-cli manage get-cr-status \
--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED}
Get the status of all components in the projects associated with the instance
cpd-cli manage get-cr-status \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED_LIST}
Get the status of the scheduling service
cpd-cli manage get-cr-status \
--cluster_component_ns=${PROJECT_SCHEDULING_SERVICE} \
--components=scheduler