09 Node_Scheduling - tothti/okd4_training GitHub Wiki
Table of Contents
it desribes the host of a node
group of machines
You need to
cluster-adminfor modifying machinesets.
oc get machinesets -n openshift-machine-apioc scale --replicas=2 machineset <machineset> -n openshift-machine-apior
oc edit machineset <machineset> -n openshift-machine-apiYou can scale the MachineSet up or down. It takes several minutes for the new machines to be available.
https://docs.okd.io/latest/machine_management/manually-scaling-machineset.html
oc get machine -n openshift-machine-apiThe command output contains a list of Machines in the <clusterid>-worker-<cloud_region> format.
oc delete machine <machine> -n openshift-machine-apiBy default, the machine controller tries to drain the node that is backed by the machine until it succeeds. In some situations, such as with a misconfigured Pod disruption budget, the drain operation might not be able to succeed in preventing the machine from being deleted. You can skip draining the node by annotating "machine.openshift.io/exclude-node-draining" in a specific machine. If the machine being deleted belongs to a MachineSet, a new machine is immediately created to satisfy the specified number of replicas.
https://docs.okd.io/latest/machine_management/deleting-machine.html
Applying autoscaling to an OKD cluster involves deploying a ClusterAutoscaler and then deploying MachineAutoscalers for each Machine type in your cluster.
adjusts the size of cluster to meet its current deployment needs
- has a cluster scope, and is not associated with a particular namespace.
- makes more machines when the cluster running out of resources
adjusts the number of Machines in the MachineSets
- makes more Machines when the cluster runs out of resources
- any changes to the autoscaler resoures (eg.: min, max) applies immediatelly to the machineset
You must deploy a MachineAutoscaler for the ClusterAutoscaler to scale your machines. The ClusterAutoscaler uses the annotations on MachineSets that the MachineAutoscaler sets to determine the resources that it can scale. If you define a ClusterAutoscaler without also defining MachineAutoscalers, the ClusterAutoscaler will never scale your cluster.
Because the ClusterAutoscaler is scoped to the entire cluster, you can make only one ClusterAutoscaler for the cluster.
You need to create a ClusterAutoscaler.yaml file, which shows the parameters and sample values for the ClusterAutoscaler.
oc create -f ClusterAutoscaler.yamlAfter you configure the ClusterAutoscaler, you must configure at least one MachineAutoscaler.
The MachineAutoscaler.yaml file shows the parameters and sample values for the MachineAutoscaler.
oc create -f MachineAutoscaler.yamloc get machineautoscalers -n openshift-machine-apioc edit machineautoscalers <autosclaer_name> -n openshift-machine-apioc describe machineautoscalers <autosclaer_name> -n openshift-machine-apihttps://docs.okd.io/latest/machine_management/applying-autoscaling.html