27.4. Querying the status of the cluster nodes by using the CLI

You can verify the status of the cluster nodes after an installation.

Conditions préalables

  • Vous avez accès au cluster en tant qu'utilisateur ayant le rôle cluster-admin.
  • Vous avez installé l'OpenShift CLI (oc).

Procédure

  1. List the status of the cluster nodes. Verify that the output lists all of the expected control plane and compute nodes and that each node has a Ready status:

    $ oc get nodes

    Exemple de sortie

    NAME                          STATUS   ROLES    AGE   VERSION
    compute-1.example.com         Ready    worker   33m   v1.25.0
    control-plane-1.example.com   Ready    master   41m   v1.25.0
    control-plane-2.example.com   Ready    master   45m   v1.25.0
    compute-2.example.com         Ready    worker   38m   v1.25.0
    compute-3.example.com         Ready    worker   33m   v1.25.0
    control-plane-3.example.com   Ready    master   41m   v1.25.0

  2. Review CPU and memory resource availability for each cluster node:

    $ oc adm top nodes

    Exemple de sortie

    NAME                          CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%
    compute-1.example.com         128m         8%     1132Mi          16%
    control-plane-1.example.com   801m         22%    3471Mi          23%
    control-plane-2.example.com   1718m        49%    6085Mi          40%
    compute-2.example.com         935m         62%    5178Mi          75%
    compute-3.example.com         111m         7%     1131Mi          16%
    control-plane-3.example.com   942m         26%    4100Mi          27%

Ressources complémentaires