health network-connectivity

Perform network health checks on resources pertaining to a IBM Software Hub deployment on a Red Hat OpenShift cluster. These checks include checking the network cluster operator, the pods in the openshift-sdn namespace, the podnetworkconnectivitycheck custom resource in the openshift-network-diagnostics namespace, and network access between the operator and operand namespaces. You must log in to the Red Hat OpenShift Container Platform as a cluster administrator to use this command.

Prerequisites

Log in to the cluster.
Log in to Red Hat® OpenShift® Container Platform as a cluster administrator.
${OC_LOGIN}
Remember: OC_LOGIN is an alias for the oc login command.
Verify the config file.

A Kubernetes config file must be at either ~/.kube/config or ~/auth/kubeconfig for this command to work. The config file must have the target cluster as the current context.

Syntax

cpd-cli health network-connectivity \
--control_plane_ns=<project-cpd-inst-operands> \
[--include_ns=<instance-namespace-list>] \
[--save] \
[--verbose]

Arguments

The command has no arguments.

Options

Table 1: Command options
Option Description
--control_plane_ns The control plane namespace.
Status
Required.
Syntax
--control_plane_ns=<project-cpd-inst-operands>
Default value
No default.
Valid values
The control plane namespace.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--include_ns A comma-separated list of instance namespaces to gather cpd-cli health info from.
Status
Optional.
Syntax
A comma-separated list of instance namespaces to gather cpd-cli health info from.=<instance-namespace-list>
Default value
<instance-namespace-list>
Valid values
A comma-separated list of instance namespaces to gather cpd-cli health info from.

This option is optional for gathering the resources and health checks for tethered namespaces.

--log-level The command log level.
Status
Optional.
Syntax
--log-level=debug|trace
Default value
No default.
Valid values
debug
Debug messages are written to the log.
trace
Trace messages are written to the log.
--save Save output, resource YAML files, and pod container logs to the local file system.
Status
Optional.
Syntax
--save
Default value
false
Valid values
true|false
--verbose Display detailed information about resources in table format.
Status
Optional.
Syntax
--verbose
Default value
false
Valid values
true|false

Examples

Note: The following examples use 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 more information, see Setting up installation environment variables.

cpd-cli health network-connectivity \
--control_plane_ns=<project-cpd-inst-operands>

Example output.

Network Cluster Operator Healthcheck                   
[SUCCESS...]                                           
                                                       
Pod Healthcheck                                        
Checks if all relevant pods are up and running         
[SUCCESS...]                                           
                                                       
PodNetworkConnectivityCheck Custom Resource Healthcheck
Checks if custom resources are in the desired state    
[SUCCESS...]                                           
                                                       
Operator To Operand Pod Connection check               
[SUCCESS...]