Control Plane Configuration
The Control Plane configuration is a critical component of the cluster setup, specifically designed for self-hosted Kubernetes clusters using the selfHosted
provisioner type.
It defines the configuration parameters for the control plane of the cluster for the selfHosted
provisioner type.
The Control Plane configuration is only required for the selfHosted
provisioner type. For managed clusters, the control plane is owned by cloud providers.
Configuration Requirements
- The
controlPlane
configuration must contain at least onenodeGroup
. - The
nodeGroup
configuration must have a validname
,minNode
,maxNode
, andmachineTypes
. - The
instanceType
must be eitherondemand
orspot
. - The
availabilityZones
list must be empty or contain at least one availability zone.
Node Groups
A Node Group represents a group of nodes in the cluster. It has the following configuration options:
- name: The name of the node group, which must be a valid DNS name and be between 1 and 50 characters long.
- minNode: The minimum number of nodes in the group.
- maxNode: The maximum number of nodes in the group.
- machineTypes: A list of machine types for the nodes in this group. The list must contain at least one machine type.
- labels: A map of labels to be applied to the nodes in this group. The map must contain at least one label.
For more information please refer the API documentation for the API Reference and look for the controlPlane
section in clusterSpec
.
Example Node Group Configuration
Here is an example of a NodeGroup
configuration:
controlPlane:
nodeGroup:
name: control-plane
machineTypes:
- t3.medium
minNode: 1
maxNode: 1
Only ondemand
instance type is supported for the control plane.
The platform will select the availability zone based on the region. It will always select the first three availability zones for the region if available. The platform tries to deploy production ready clusters in the selected availability zones.
Retrieving Regions and Availability Zones
To retrieve a list of available regions and availability zones, you can use the astroctl
command. For example, to get regions on AWS, you can run the following command:
Command to get all the regions for a AWS provider
$ astroctl providers regions get -p aws
astroctl providers regions list -p aws
ap-northeast-1
ap-northeast-2
ap-northeast-3
ap-south-1
ap-southeast-1
ap-southeast-2
ca-central-1
eu-central-1
eu-north-1
eu-west-1
eu-west-2
eu-west-3
sa-east-1
us-east-1
us-east-2
us-west-1
us-west-2
Command to get all the zones for a region for AWS provider
$ astroctl providers regions zones list -r us-west-2 -p aws
us-west-2a
us-west-2b
us-west-2c
Retrieving Machine Types
To retrieve a list of available machine types, you can use the astroctl
command. For example, to get machine types in the us-west-2
region on AWS with a minimum of 2 CPUs and a maximum of 4 CPUs, you can run the following command:
$ astroctl providers machinetypes get -r us-west-2 -p aws --cpuMax 4 --cpuMin 2
MACHINE_TYPE CATEGORY VCPU MEMORY (MB) SPOT_PRICE/HOUR ON_DEMAND_PRICE/HOUR PERCENTAGE_DIFFERENCE
m1.large generalpurpose 2 7680 0.073600 0.1750000000 57.94285714285714
m1.xlarge generalpurpose 4 15360 0.131900 0.3500000000 62.31428571428571
m2.2xlarge generalpurpose 4 35020 0.113600 0.4900000000 76.81632653061223
m2.xlarge generalpurpose 2 17510 0.092000 0.2450000000 62.44897959183674
m3.large generalpurpose 2 7680 0.056300 0.1330000000 57.669172932330824
m3.xlarge generalpurpose 4 15360 0.106800 0.2660000000 59.849624060150376
m4.large generalpurpose 2 8192 0.049600 0.1000000000 50.4
m4.xlarge generalpurpose 4 16384 0.081000 0.2000000000 59.5
m5.large generalpurpose 2 8192 0.039700 0.0960000000 58.64583333333333
For more information, see astroctl providers machinetypes get
command.