2018-11-08 15:57:20 -05:00
|
|
|
// Module included in the following assemblies:
|
|
|
|
|
//
|
2019-09-22 19:19:24 -04:00
|
|
|
// * machine_management/creating_machinesets/creating-machineset-aws.adoc
|
|
|
|
|
// * machine_management/creating_machinesets/creating-machineset-azure.adoc
|
|
|
|
|
// * machine_management/creating_machinesets/creating-machineset-gcp.adoc
|
2020-05-06 18:16:26 -04:00
|
|
|
// * machine_management/creating_machinesets/creating-machineset-osp.adoc
|
2020-11-05 13:34:32 -05:00
|
|
|
// * machine_management/creating_machinesets/creating-machineset-vsphere.adoc
|
2018-11-08 15:57:20 -05:00
|
|
|
|
2019-05-13 08:55:00 +10:00
|
|
|
[id="machine-api-overview_{context}"]
|
2018-11-08 15:57:20 -05:00
|
|
|
= Machine API overview
|
|
|
|
|
|
2019-03-12 17:50:33 -04:00
|
|
|
The Machine API is a combination of primary resources that are based on the
|
|
|
|
|
upstream Cluster API project and custom {product-title} resources.
|
2018-11-08 15:57:20 -05:00
|
|
|
|
2019-05-03 10:37:36 +02:00
|
|
|
For {product-title} {product-version} clusters, the Machine API performs all node
|
|
|
|
|
host provisioning management actions after the cluster installation finishes.
|
|
|
|
|
Because of this system, {product-title} {product-version} offers an elastic,
|
|
|
|
|
dynamic provisioning method on top of public or private cloud infrastructure.
|
|
|
|
|
|
2019-02-26 15:45:26 -05:00
|
|
|
The two primary resources are:
|
2018-11-08 15:57:20 -05:00
|
|
|
|
2019-05-03 10:37:36 +02:00
|
|
|
Machines:: A fundamental unit that describes the host for a Node. A machine has a
|
2019-02-28 15:35:51 +01:00
|
|
|
providerSpec, which describes the types of compute nodes that are offered for different
|
2019-05-03 10:37:36 +02:00
|
|
|
cloud platforms. For example, a machine type for a worker node on Amazon Web
|
2018-11-08 15:57:20 -05:00
|
|
|
Services (AWS) might define a specific machine type and required metadata.
|
2019-05-03 10:37:36 +02:00
|
|
|
MachineSets:: Groups of machines. MachineSets are to machines as
|
2020-10-04 22:59:11 -04:00
|
|
|
ReplicaSets are to pods. If you need more machines or must scale them down,
|
2019-05-03 10:37:36 +02:00
|
|
|
you change the *replicas* field on the MachineSet to meet your compute need.
|
2018-11-08 15:57:20 -05:00
|
|
|
|
|
|
|
|
The following custom resources add more capabilities to your cluster:
|
|
|
|
|
|
2019-05-03 10:37:36 +02:00
|
|
|
MachineAutoscaler:: This resource automatically scales machines in
|
2018-11-08 15:57:20 -05:00
|
|
|
a cloud. You can set the minimum and maximum scaling boundaries for nodes in a
|
2019-05-03 10:37:36 +02:00
|
|
|
specified MachineSet, and the MachineAutoscaler maintains that range of nodes.
|
|
|
|
|
The MachineAutoscaler object takes effect after a ClusterAutoscaler object
|
|
|
|
|
exists. Both ClusterAutoscaler and MachineAutoscaler resources are made
|
|
|
|
|
available by the ClusterAutoscalerOperator.
|
2019-03-12 17:50:33 -04:00
|
|
|
|
2019-05-03 10:37:36 +02:00
|
|
|
ClusterAutoscaler:: This resource is based on the upstream ClusterAutoscaler
|
2018-11-08 15:57:20 -05:00
|
|
|
project. In the {product-title} implementation, it is integrated with the
|
2019-05-03 10:37:36 +02:00
|
|
|
Machine API by extending the MachineSet API. You can set cluster-wide
|
2019-02-27 13:06:42 -05:00
|
|
|
scaling limits for resources such as cores, nodes, memory, GPU,
|
2018-11-08 15:57:20 -05:00
|
|
|
and so on. You can set the priority so that the cluster prioritizes pods so that
|
|
|
|
|
new nodes are not brought online for less important pods. You can also set the
|
|
|
|
|
ScalingPolicy so you can scale up nodes but not scale them down.
|
2019-03-12 17:50:33 -04:00
|
|
|
|
2019-05-03 10:37:36 +02:00
|
|
|
MachineHealthCheck:: This resource detects when a machine is unhealthy,
|
2019-02-28 15:35:51 +01:00
|
|
|
deletes it, and, on supported platforms, makes a new machine.
|
2019-05-03 10:37:36 +02:00
|
|
|
+
|
|
|
|
|
[NOTE]
|
|
|
|
|
====
|
|
|
|
|
In version {product-version}, MachineHealthChecks is a Technology Preview
|
|
|
|
|
feature
|
|
|
|
|
====
|
2018-11-08 15:57:20 -05:00
|
|
|
|
2019-03-12 17:50:33 -04:00
|
|
|
In {product-title} version 3.11, you could not roll out a multi-zone
|
|
|
|
|
architecture easily because the cluster did not manage machine provisioning.
|
2019-10-09 17:20:01 -04:00
|
|
|
Beginning with {product-title} version 4.1, this process is easier. Each MachineSet is scoped to a
|
2019-05-03 10:37:36 +02:00
|
|
|
single zone, so the installation program sends out MachineSets across
|
2019-03-12 17:50:33 -04:00
|
|
|
availability zones on your behalf. And then because your compute is dynamic, and
|
2019-05-03 10:37:36 +02:00
|
|
|
in the face of a zone failure, you always have a zone for when you must
|
2019-03-12 17:50:33 -04:00
|
|
|
rebalance your machines. The autoscaler provides best-effort balancing over the
|
|
|
|
|
life of a cluster.
|