OpenShift - List Schedulers using the oc get scheduler command

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

The scheduler is responsible for determining which worker node a resource should get created on. For example, when deploying a new application to OpenShift, the scheduler determines which worker node the pod should be created on, typically the worker node with the most available memory and CPU.

The oc get schedulers command can be used to list the schedulers. By default, there is typically just a single scheduler, named "cluster".

~]$ oc get scheduler -A
NAME      AGE
cluster   397d

 

The oc describe scheduler command can be used to show more details of the scheduler.

~]$ oc describe scheduler cluster
Name:         cluster
Namespace:    
Labels:       <none>
Annotations:  <none>
API Version:  config.openshift.io/v1
Kind:         Scheduler
Metadata:
  Creation Timestamp:  2021-07-16T17:10:12Z
  Generation:          2
  Managed Fields:
    API Version:  config.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:spec:
        .:
        f:mastersSchedulable:
        f:policy:
          .:
          f:name:
      f:status:
    Manager:      cluster-bootstrap
    Operation:    Update
    Time:         2021-07-16T17:10:12Z
    API Version:  config.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
      f:spec:
        f:defaultNodeSelector:
    Manager:         kubectl-client-side-apply
    Operation:       Update
    Time:            2021-07-19T19:32:04Z
  Resource Version:  1286029
  UID:               8a2b1f4a-c0c9-42a6-ba7a-9d790baf1572
Spec:
  Default Node Selector:  node-type=general
  Masters Schedulable:    false
  Policy:
    Name:  
Status:
Events:  <none>

 

Or, the oc get scheduler command with the --output yaml or --output json option can be used.

~]$ oc get scheduler cluster --output yaml
apiVersion: config.openshift.io/v1
kind: Scheduler
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"config.openshift.io/v1","kind":"Scheduler","metadata":{"annotations":{},"name":"cluster"},"spec":{"defaultNodeSelector":"node-type=general","mastersSchedulable":false,"policy":{"name":""}},"status":{}}
  creationTimestamp: "2021-07-16T17:10:12Z"
  generation: 2
  name: cluster
  resourceVersion: "1286029"
  uid: 8a2b1f4a-c0c9-42a6-ba7a-9d790baf1572
spec:
  defaultNodeSelector: node-type=general
  mastersSchedulable: false
  policy:
    name: ""
status: {}

 




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 b3a8d 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   |