OpenShift - List Machine Config Pool using the oc get machineconfigpool command

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

The Machine Config Pool contains the Machine Config Operators. The Machine Config Operators are used to manage and apply changes to the base operating system and container runtimes OpenShift is running on.

The oc get machineconfigpool (or oc get mcp) command can be used to display the status of the machines in the machine config pool. 

~]$ oc get machineconfigpool
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
master   rendered-master-7faa2613ff4cb839661665369eb6daa3   True      False      False      3              3                   3                     0                      364d
worker   rendered-worker-9e45f0c616ea39f264afb99aa61d3c7d   True      False      False      23             23                  23                    0                      364d

 

Or to only display the master machine.

~]$ oc get machineconfigpool master
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
master   rendered-master-7faa2613ff4cb839661665369eb6daa3   True      False      False      3              3                   3                     0                      364d

 

Or to only display the worker machine.

~]$ oc get machineconfigpool worker
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
worker   rendered-worker-9e45f0c616ea39f264afb99aa61d3c7d   True      False      False      23             23                  23                    0                      364d

 

If one of the machines is updating, UPDATING will be True and READYMACHINECOUNT should be less than MACHINECOUNT and UPDATEDMACHINECOUNT.

~]$ oc get machineconfigpool
NAME     CONFIG                                             UPDATED   UPDATING   DEGRADED   MACHINECOUNT   READYMACHINECOUNT   UPDATEDMACHINECOUNT   DEGRADEDMACHINECOUNT   AGE
master   rendered-master-7faa2613ff4cb839661665369eb6daa3   True      False      False      3              3                   3                     0                      364d
worker   rendered-worker-9e45f0c616ea39f264afb99aa61d3c7d   False     True       False      23             22                  23                    0                      364d

 

The oc get nodes command can be used to list the machines in each machine config pool.

~]# oc get nodes
NAME                 STATUS    ROLES     AGE       VERSION
dev001-infra-4k6z9   Ready     infra     273d      v1.11.0+d4cacc0
dev001-master-0      Ready     master    273d      v1.11.0+d4cacc0
dev001-worker-5n4fj  Ready     worker    273d      v1.11.0+d4cacc0

 

The oc describe machineconfigpool command can be used to show more details of one of the machines. 

oc describe machineconfigpool master

 

Or the oc get mcp command with the --output json or --output yaml option can be used to output the JSON or YAML for the machine.

oc get mcp --output yaml

 

Or like this, to return a certain key.

oc get machineconfigpool/master --template='{{.apiVersion}}'

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.





Please enter 02f93 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |