Bootstrap FreeKB - OpenShift - List machine sets using the oc get machineset command
OpenShift - List machine sets using the oc get machineset command

Updated:   |  OpenShift articles

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

I like to think of a "machine" as OpenShift representation of a Virtual Machine, such as an Amazon Web Services (AWS) EC2 Instance, or a VMWare Virtual Machine, and then a Node, and then the pods running on the node.

 

The oc get machineset command can be used to display the cluster of edge, infra and worker machines. Almost always, the machines will be in the openshift-machine-api namespace.

~]$ oc get machineset --namespace openshift-machine-api
NAME            DESIRED   CURRENT   READY   AVAILABLE   AGE
lab001-edge     2         2         2       2           140d
lab001-infra    3         3         3       3           140d
lab001-worker   2         2         2       2           143d

 

The -o yaml option can be used to output the YAML for each machine set.

oc get machineset/lab001-worker --namespace openshift-machine-api -o yaml

 

Which should return YAML that begins like this.

apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
  creationTimestamp: "2021-07-16T17:10:51Z"
  generation: 4
  labels:
    machine.openshift.io/cluster-api-cluster: lab001

 




Did you find this article helpful?

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



Comments


Add a Comment


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