Opening logs in Red Hat OpenShift

You can open and view microservice logs by using the Red Hat® OpenShift® Container Platform console or the Red Hat OpenShift command-line interface (CLI).

Opening logs in the OpenShift Container Platform console

  1. Log in to your OpenShift Container Platform cluster.
  2. From the navigation menu, click Workloads > Pods.
  3. Go to the namespace where the Cloud Pak is installed.
  4. Locate and click the name of the pod whose logs you want to view. The names of the Cloud Pak pods begin with cp4na-o.
  5. Click the Logs tab to open and view the logs.

Opening logs in the OpenShift CLI

  1. Display a list of all pods by running this command:
    oc get pods -n <cp4na_namespace>
    <cp4na_namespace> is the namespace where the Cloud Pak is installed.
  2. Identify the pod whose logs you want to view. The names of the Cloud Pak pods begin with cp4na-o.
  3. Open and view the pod logs by running this command:
    oc logs <pod_name>
    <pod_name> is the name of the pod whose logs you want to view.

    The logs are written to a standard output (stdout) stream in the terminal window.