Here are some basic troubleshooting methods to check if the operator is running fine:
-
Run the following and check if the output is similar to the following:
$ oc get pods -l name=appsody-operator NAME READY STATUS RESTARTS AGE appsody-operator-584d6bd86d-fzq2n 1/1 Running 0 33m
-
Check the operators events:
$ oc describe pod appsody-operator-584d6bd86d-fzq2n
-
Check the operator logs:
$ oc logs appsody-operator-584d6bd86d-fzq2n
If the operator is running fine, check the status of the AppsodyApplication
Custom Resource (CR) instance:
-
Check the CR status:
$ oc get appsodyapplication my-appsody-app -o wide NAME IMAGE EXPOSED RECONCILED REASON MESSAGE AGE my-appsody-app quay.io/my-repo/my-app:1.0 false True 1h
-
Check the CR effective fields:
$ oc get appsodyapplication my-appsody-app -o yaml
Ensure that the effective CR values are what you want since the initial CR values you specified might have been masked by the default values from the default and constant
ConfigMap
s. -
Check the
status
section of the CR. If the CR was successfully reconciled, the output should look like the following:$ oc get appsodyapplication my-appsody-app -o yaml apiVersion: appsody.dev/v1beta1 kind: AppsodyApplication ... status: conditions: - lastTransitionTime: 2019-08-21T22:20:49Z lastUpdateTime: 2019-08-21T22:39:42Z status: "True" type: Reconciled
-
Check the CR events:
$ oc describe appsodyapplication my-appsody-app
Appsody Operator must-gather
is a tool built on top of OpenShift must-gather that expands its capabilities to gather information about the Appsody Operator.
$ oc adm must-gather --image=docker.io/appsody/application-operator:daily-must-gather
Note: must-gather
flag is a new feature added to OpenShift client CLI v4.x. If you are using an older version of OpenShift client CLI, you can get a new version of the CLI from here. You can use OpenShift client CLI v4.x against 3.11 cluster.
The command above will create a local directory with a dump of the Appsody Operator collection state. Note that this command will only get data related to the Appsody Operator Collection of the OpenShift cluster.
In order to get data about other parts of the cluster (not specific to Appsody Operator) you should run just oc adm must-gather
(without passing a custom image). Run oc adm must-gather -h
to see more options.