Bootstrap FreeKB - OpenShift - List Cluster Operators using the oc get clusteroperator command
OpenShift - List Cluster Operators using the oc get clusteroperator command

Updated:   |  OpenShift articles

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

The oc get clusteroperator (or oc get co) command can be used to list the cluster operators. Something like this should be returned.

~]$ oc get clusteroperator
NAME                                       VERSION   AVAILABLE   PROGRESSING   DEGRADED   SINCE
authentication                             4.6.41    True        False         False      40d
cloud-credential                           4.6.41    True        False         False      335d
cluster-autoscaler                         4.6.41    True        False         False      335d
config-operator                            4.6.41    True        False         False      335d
console                                    4.6.41    True        False         True       6d14h
csi-snapshot-controller                    4.6.41    True        False         False      6d15h
dns                                        4.6.41    True        False         False      225d
etcd                                       4.6.41    True        False         False      335d
image-registry                             4.6.41    True        False         False      6d15h
ingress                                    4.6.41    True        False         False      40d
insights                                   4.6.41    True        False         False      335d
kube-apiserver                             4.6.41    True        False         False      335d
kube-controller-manager                    4.6.41    True        False         False      335d
kube-scheduler                             4.6.41    True        False         False      335d
kube-storage-version-migrator              4.6.41    True        False         False      6d13h
machine-api                                4.6.41    True        False         False      335d
machine-approver                           4.6.41    True        False         False      335d
machine-config                             4.6.41    True        False         False      6d12h
marketplace                                4.6.41    True        False         False      6d14h
monitoring                                 4.6.41    True        False         False      6d12h
network                                    4.6.41    True        False         False      335d
node-tuning                                4.6.41    True        False         False      6d15h
openshift-apiserver                        4.6.41    True        False         False      6d14h
openshift-controller-manager               4.6.41    True        False         False      17d
openshift-samples                          4.6.41    True        False         False      6d15h
operator-lifecycle-manager                 4.6.41    True        False         False      335d
operator-lifecycle-manager-catalog         4.6.41    True        False         False      335d
operator-lifecycle-manager-packageserver   4.6.41    True        False         False      6d14h
service-ca                                 4.6.41    True        False         False      335d
storage                                    4.6.41    True        False         False      225d

 

Optionally, you can list one of the cluster operator objects to just display the details for a single object.

~]$ oc get clusteroperator network
NAME      VERSION   AVAILABLE   PROGRESSING   DEGRADED   SINCE
network   4.6.41    True        False         False      335d

 

The oc describe clusteroperator command can be used to display the details of a cluster operator. In this example, the details of the authentication object will be displayed.

~]$ oc describe clusteroperator authentication
Name:         authentication
Namespace:    
Labels:       <none>
Annotations:  exclude.release.openshift.io/internal-openshift-hosted: true
              include.release.openshift.io/self-managed-high-availability: true
API Version:  config.openshift.io/v1
Kind:         ClusterOperator
Metadata:
  Creation Timestamp:  2021-07-16T17:10:14Z
  Generation:          1
  Managed Fields:
    API Version:  config.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:exclude.release.openshift.io/internal-openshift-hosted:
          f:include.release.openshift.io/self-managed-high-availability:
      f:spec:
      f:status:
        .:
        f:extension:
    Manager:      cluster-version-operator
    Operation:    Update
    Time:         2021-07-16T17:10:14Z
    API Version:  config.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        f:conditions:
        f:relatedObjects:
        f:versions:
    Manager:         authentication-operator
    Operation:       Update
    Time:            2022-01-26T09:19:49Z
  Resource Version:  444732017
  UID:               6346f0d6-9383-4f6f-b154-6c7f8f8d8c38
Spec:
Status:
  Conditions:
    Last Transition Time:  2022-06-22T13:53:33Z
    Message:               All is well
    Reason:                AsExpected
    Status:                False
    Type:                  Degraded
    Last Transition Time:  2022-07-25T07:30:21Z
    Message:               AuthenticatorCertKeyProgressing: All is well
    Reason:                AsExpected
    Status:                False
    Type:                  Progressing
    Last Transition Time:  2022-07-26T16:54:40Z
    Message:               All is well
    Reason:                AsExpected
    Status:                True
    Type:                  Available
    Last Transition Time:  2021-07-16T17:12:54Z
    Message:               All is well
    Reason:                AsExpected
    Status:                True
    Type:                  Upgradeable
  Extension:               <nil>
  Related Objects:
    Group:      operator.openshift.io
    Name:       cluster
    Resource:   authentications
    Group:      config.openshift.io
    Name:       cluster
    Resource:   authentications
    Group:      config.openshift.io
    Name:       cluster
    Resource:   infrastructures
    Group:      config.openshift.io
    Name:       cluster
    Resource:   oauths
    Group:      route.openshift.io
    Name:       oauth-openshift
    Namespace:  openshift-authentication
    Resource:   routes
    Group:      
    Name:       oauth-openshift
    Namespace:  openshift-authentication
    Resource:   services
    Group:      
    Name:       openshift-config
    Resource:   namespaces
    Group:      
    Name:       openshift-config-managed
    Resource:   namespaces
    Group:      
    Name:       openshift-authentication
    Resource:   namespaces
    Group:      
    Name:       openshift-authentication-operator
    Resource:   namespaces
    Group:      
    Name:       openshift-ingress
    Resource:   namespaces
    Group:      
    Name:       openshift-oauth-apiserver
    Resource:   namespaces
  Versions:
    Name:     oauth-apiserver
    Version:  4.8.42
    Name:     operator
    Version:  4.8.42
    Name:     oauth-openshift
    Version:  4.8.42_openshift
Events:       <none>

 

The oc get clusterserviceversions (or just oc get csv) command can be used to list your Cluster Service Versions (CSVs) which may include certain Operators.

~]$ oc get clusterserviceversions --namespace openshift-logging
NAME                             DISPLAY                            VERSION   REPLACES                         PHASE
cluster-logging.v5.6.15          Red Hat OpenShift Logging          5.6.15    cluster-logging.v5.6.14          Succeeded
elasticsearch-operator.v5.6.15   OpenShift Elasticsearch Operator   5.6.15    elasticsearch-operator.v5.6.14   Succeeded



Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 8f636b in the box below so that we can be sure you are a human.