Viewing operator application status

An application administrator can view the status of an application that is deployed in a container. To get information about the deployed custom resource (CR), use a CLI or the Red Hat® OpenShift® console.

Status types for .status.condition

The status types for the .status.condition parameter in the WebSphereLibertyApplication CR are Ready, ResourcesReady, Reconciled.

Reconciled
Indicates whether the current version of the operator successfully processed the configurations in the CR.
ResourcesReady
Indicates whether the application resources created and managed by the operator are ready.
Ready
Indicates the overall status of the application. If true, the application configuration was reconciled and its resource are in ready state.

Viewing status with the CLI

To use the CLI to get information about a deployed CR, run a kubectl get or oc get command.

To run kubectl commands, you need the Kubernetes command line tool or the Red Hat OpenShift command-line interface (CLI). To run oc commands, you need the Red Hat OpenShift CLI.

In the following get commands, replace my-app with your CR name. Run any one of the commands. wlapp and wlapps are short names for webspherelibertyapplication and webspherelibertyapplications.

  • Run any of the following kubectl get commands.
    kubectl get wlapp my-app
    
    kubectl get wlapps my-app
    
    kubectl get webspherelibertyapplication my-app
  • Run any of the following oc get commands.
    oc get wlapp my-app
    
    oc get wlapps my-app
    
    oc get webspherelibertyapplication my-app

The results of the command resemble the following.

NAME             IMAGE                       EXPOSED   RECONCILED   RESOURCESREADY   READY   AGE
my-app   quay.io/my-repo/my-app:1.0            True         True             True    18m

The value in the READY column is True when the application is successfully installed. If the value in the READY column is not True, see Troubleshooting WebSphere Liberty operators.

Viewing status with the Red Hat OpenShift console

To use the Red Hat OpenShift console to get information about a deployed CR, view the deployed WebSphereLibertyApplication instance and inspect the .status section.

apiVersion: liberty.websphere.ibm.com/v1
kind: WebSphereLibertyApplication
metadata:
  name: my-app
  namespace: openshift-operators
spec:
  applicationImage: 'quay.io/my-repo/my-app:1.0'
  license:
    accept: true
    edition: IBM WebSphere Application Server
    productEntitlementSource: Standalone
status:
  conditions:
    - lastTransitionTime: '2022-05-10T15:59:04Z'
      status: 'True'
      type: Reconciled
    - lastTransitionTime: '2022-05-10T15:59:16Z'
      message: 'Deployment replicas ready: 3/3'
      reason: MinimumReplicasAvailable
      status: 'True'
      type: ResourcesReady
    - lastTransitionTime: '2022-05-10T15:59:16Z'
      message: Application is reconciled and resources are ready.
      status: 'True'
      type: Ready
  imageReference: 'quay.io/my-repo/my-app:1.0'
  references:
    svcCertSecretName: my-app-svc-tls-ocp
  versions:
    reconciled: 1.0.0

If the .status.conditions.type Ready type does not have a status of True, see Troubleshooting WebSphere Liberty operators.

The value of the .status.versions.reconciled parameter is the version of the operand that is deployed into the cluster after the reconcile loop completes.