Determining the status of pods in the Kubernetes environment

You can display information and messages related to Kubernetes pods to stdout.

Perform the following commands on the Kubernetes Adminstration Terminal.
  1. Change to the CWP_12_deployment_folderkube/deploy folder.
  2. To get a list of pods in the and the state of each pod, type kubectl get pods -A .
    The command displays a list that contains the name of each pod and the status. When a pod starts successfully the status is 1/1. If the pod cannot start, the value of the numerator for the ready count is less than the value of the denominator.

    The following figure provides an example of the output where two kafka-connect pods in the cw-qa environment have not started.

    Figure 1. Output of kubectl get pods Command
  3. To generate the log files for a specific node, type k logs -n namespace pod_name.
    For example, to view log files for a pod named kafka-connect-74df5885d-4qqxf, type k logs -n prod kafka-connect-74df5885d-4qqxf

Articles in this section

Was this article helpful?
0 out of 0 found this helpful