AWSClusterConfiguration
Version: deckhouse.io/v1
Describes the configuration of a cloud cluster in AWS.
Used by the cloud provider if a cluster’s control plane is hosted in the cloud.
Run the following command to change the configuration in a running cluster:
d8 system edit provider-cluster-configuration
After updating the node parameters, you need to run the dhctl converge command to apply the changes.
Example:
apiVersion: deckhouse.io/v1
kind: AWSClusterConfiguration
layout: WithoutNAT
sshPublicKey: "<SSH_PUBLIC_KEY>"
nodeNetworkCIDR: 172.16.0.0/22
vpcNetworkCIDR: 172.16.0.0/16
masterNodeGroup:
replicas: 1
instanceClass:
instanceType: m5.xlarge
ami: ami-08b6d44b4f6f7b279
diskType: gp3
nodeGroups:
- name: worker
nodeTemplate:
labels:
node-role.kubernetes.io/worker: ''
replicas: 2
instanceClass:
instanceType: t2.medium
ami: ami-0caef02b518350c8b
additionalTags:
backup: srv1
provider:
providerAccessKeyId: "<AWS_ACCESS_KEY>"
providerSecretAccessKey: "<AWS_SECRET_ACCESS_KEY>"
region: eu-central-1
tags:
team: rangers
- array of stringsadditionalRolePolicies
A list containing additional policy actions for IAM roles.
- Additional policy actions would be attached to the default IAM role policy actions.
- Parameter is optional. If omitted, only default IAM role policy actions are used.
- Example of policy actions:
ecr:ListImages,s3:GetObject, etc.
Default IAM role policies actions contain the following roles:
ec2:DescribeTagsec2:DescribeInstances
- stringElement of the array
Pattern:
^([a-zA-Z0-9_\-]+):([a-zA-Z0-9_\-\*\?]+)$
- stringapiVersion
Required value
Allowed values:
deckhouse.io/v1,deckhouse.io/v1alpha1 - booleandisableDefaultSecurityGroup
If set to
true, the default security group will not be created.Warning. When using
disableDefaultSecurityGroup: true, you must manually create all required security groups to allow access to cluster nodes. Additionally, you must explicitly specify them in the following parameters:additionalSecurityGroupsin themasterNodeGroupsection of theAWSClusterConfigurationresource;additionalSecurityGroupsin theAWSInstanceClassresource;additionalSecurityGroupsin thenodeGroups.instanceClasssection.
To configure the security groups used by load balancers, specify them using the
service.beta.kubernetes.io/aws-load-balancer-security-groupsannotation. - stringexistingVPCID
ID of the existing VPC to use for deploying.
- A mandatory parameter if the
vpcNetworkCIDRis omitted. - Caution! If there is an Internet Gateway in the target VPC, the deployment of the basic infrastructure will fail with an error. Currently, an Internet Gateway cannot be adopted.
- A mandatory parameter if the
- stringiamNodeRole
The name of the IAM role that will be attached to all AWS instances of the cluster nodes.
DKP always creates and assigns a special IAM role named
<PREFIX>-nodeto each AWS instance of the cluster nodes (<PREFIX>is the value of the parameter cloud.prefix in the common cluster parameters). You can specify your IAM-role with greater permissions in theiamNodeRoleparameter, but it is important that it includes the IAM policies of the role created by DKP (the<PREFIX>-noderole).More details about IAM roles for AWS EC2 can be found in the AWS documentation.
Pattern:
^[a-zA-Z0-9+=,.@\-_']{1,64}$ - stringkind
Required value
Allowed values:
AWSClusterConfiguration - stringlayout
Required value
The way resources are located in the cloud.
Read more about possible provider layouts.
Note, that the
Standardlayout is deprecated.Allowed values:
WithoutNAT,WithNAT,Standard - objectmasterNodeGroup
Required value
Parameters of the master’s NodeGroup.
For the changes to take effect, run
dhctl convergeafter modifying the parameters of themasterNodeGroupsection.- object
The additional tags to attach to the instances created (in addition to those specified in the cloud provider configuration).
Example:
additionalTags: project: cms-production severity: critical - objectmasterNodeGroup.instanceClass
Required value
Partial contents of the fields of the AWSInstanceClass.
- array of stringsmasterNodeGroup.instanceClass.additionalSecurityGroups
The additional security groups to add to provisioned instances of the specific InstanceClass.
- stringmasterNodeGroup.instanceClass.ami
Required value
The Amazon Machine Image (AMI ID) to use in provisioned instances.
Here is how you can find the required AMI (each region has its own set of AMIs):
aws ec2 --region <REGION> describe-images \ --filters 'Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-2020*' | \ jq '.Images[].ImageId'Example:
ami: ami-040a1551f9c9d11ad - integermasterNodeGroup.instanceClass.diskSizeGb
Instance disk size in gibibytes.
Example:
diskSizeGb: 50 - stringmasterNodeGroup.instanceClass.diskType
Instance EBS disk type.
Allowed values:
gp3,gp2,io2,io1,st1,sc1Example:
diskType: gp2 - objectmasterNodeGroup.instanceClass.etcdDisk
Default:
{"sizeGb":20,"type":"gp3"}- integermasterNodeGroup.instanceClass.etcdDisk.sizeGb
Etcd disk size in gibibytes.
- stringmasterNodeGroup.instanceClass.etcdDisk.type
Etcd disk type.
- stringmasterNodeGroup.instanceClass.instanceType
Required value
Instance type of AWS instance.
Caution! Ensure that this type is present in all zones specified in the
zonesparameter.Example:
instanceType: t3.large
- integermasterNodeGroup.replicas
Required value
The number of master nodes to create.
It is important to have an odd number of masters to ensure a quorum.
Allowed values:
1 <= X - array of stringsmasterNodeGroup.zones
Not required value.
A limited set of zones in which master nodes can be created.
The order in which zones are specified does not influence the sequence of node creation. Nodes are assigned to zones in alphabetical order: the first node is placed in the alphabetically first zone, the second node in the second zone, and so forth. If there are more nodes than zones, the assignment process restarts from the beginning of the zone list after placing a node in the last alphabetical zone.
- array of objectsnodeGroups
An array of additional NodeGroups for creating static nodes (e.g., for dedicated front nodes or gateways).
- object
The additional tags to attach to the instances created (in addition to those specified in the cloud provider configuration).
Example:
project: cms-production severity: critical - array of stringsnodeGroups.instanceClass.additionalSecurityGroups
The additional security groups to add to provisioned instances of the specific InstanceClass.
- stringnodeGroups.instanceClass.ami
Required value
The Amazon Machine Image (AMI ID) to use in provisioned instances.
Here is how you can find the required AMI (each region has its own set of AMIs):
aws ec2 --region <REGION> describe-images \ --filters 'Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-2020*' | \ jq '.Images[].ImageId'Example:
ami: ami-040a1551f9c9d11ad - integernodeGroups.instanceClass.diskSizeGb
Instance disk size in gibibytes.
Example:
diskSizeGb: 50 - stringnodeGroups.instanceClass.diskType
Instance EBS disk type.
Allowed values:
gp3,gp2,io2,io1,st1,sc1Example:
diskType: gp2 - stringnodeGroups.instanceClass.instanceType
Required value
Instance type of AWS instance.
Caution! Ensure that this type is present in all zones specified in the
zonesparameter.Example:
instanceType: t3.large
- stringnodeGroups.name
Required value
The name of the NodeGroup. It is used to generate the node name.
- nodeGroups.nodeTemplate
Parameters of Node objects in Kubernetes to add after registering the node.
- objectnodeGroups.nodeTemplate.annotations
The same as the
metadata.annotationsstandard field.Example:
annotations: ai.fleet.com/discombobulate: "true" - objectnodeGroups.nodeTemplate.labels
A list of labels to attach to cluster resources.
The same as the
metadata.labelsstandard field.Note that you have to re-create all the machines to add new tags if tags were modified in the running cluster.
Example:
labels: environment: production app: warp-drive-ai - array of objectsnodeGroups.nodeTemplate.taints
The same as the
.spec.taintsfield of the Node object.Available fields:
effect,key, andvalues.Example:
taints: - effect: NoExecute key: ship-class value: frigate- stringnodeGroups.nodeTemplate.taints.effect
Allowed values:
NoSchedule,PreferNoSchedule,NoExecute - stringnodeGroups.nodeTemplate.taints.key
- stringnodeGroups.nodeTemplate.taints.value
- integernodeGroups.replicas
Required value
The number of nodes.
- array of stringsnodeGroups.zones
Not required value.
A limited set of zones in which nodes can be created.
The order in which zones are specified does not influence the sequence of node creation. Nodes are assigned to zones in alphabetical order: the first node is placed in the alphabetically first zone, the second node in the second zone, and so forth. If there are more nodes than zones, the assignment process restarts from the beginning of the zone list after placing a node in the last alphabetical zone.
- stringnodeNetworkCIDR
A subnet to use for cluster nodes:
- The IP range must overlap or match the VPC address range.
- The IP range will be evenly split into subnets, one per Availability Zone in your region.
- An optional but recommended parameter. By default, it corresponds to the whole range of VPC addresses.
If a new VPC is created along with a new cluster and no
vpcNetworkCIDRis provided, then the range fromnodeNetworkCIDRis used for the VPC. Thus, the entire VPC is allocated for the cluster networks, and you will not be able to add other resources to this VPC.The
nodeNetworkCIDRrange is distributed between subnets depending on the number of availability zones in the selected region. For example, ifnodeNetworkCIDR: "10.241.1.0/20"and there are three availability zones in the region, subnets will be created with the/22mask.Pattern:
^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(3[0-2]|[1-2][0-9]|[0-9]))$ - array of stringspeeredVPCs
A list of AWS VPC IDs to peer with the cluster network.
The service account must have access to all the VPCs listed. You have to configure the peering connection manually if no access is available.
- stringprovider.region
Required value
The name of the AWS region where instances will be provisioned.
- array of stringssshAllowList
A list of CIDR’s allowed to connect to nodes via SSH.
By default,
0.0.0.0/0. - stringsshPublicKey
Required value
A public key for accessing nodes.
- objectstandardDeprecated
Layout is deprecated.
- object
Not required value.
A dictionary of tags to create on all resources that support this feature.
You have to re-create all the machines to add new tags if tags were modified in the running cluster.
- stringvpcNetworkCIDR
A subnet to use in the VPC being created.
A mandatory parameter if the
existingVPCIDparameter is omitted.Pattern:
^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(3[0-2]|[1-2][0-9]|[0-9]))$ - objectwithNAT
- objectwithNAT.bastionInstance
- objectwithNAT.bastionInstance.instanceClass
Required value
Partial contents of the fields of the AWSInstanceClass.
- array of stringswithNAT.bastionInstance.instanceClass.additionalSecurityGroups
The additional security groups to add to provisioned instance of the specific InstanceClass.
- stringwithNAT.bastionInstance.instanceClass.ami
Required value
The Amazon Machine Image (AMI ID) to use in provisioned instance.
Here is how you can find the required AMI (each region has its own set of AMIs):
aws ec2 --region <REGION> describe-images \ --filters 'Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-2020*' | \ jq '.Images[].ImageId'Example:
ami: ami-040a1551f9c9d11ad - integerwithNAT.bastionInstance.instanceClass.diskSizeGb
Instance disk size in gibibytes.
Example:
diskSizeGb: 20 - stringwithNAT.bastionInstance.instanceClass.diskType
Instance EBS disk type.
Allowed values:
gp3,gp2,io2,io1,st1,sc1Example:
diskType: gp2 - stringwithNAT.bastionInstance.instanceClass.instanceType
Required value
Instance type of AWS instance.
Caution! Ensure that this type is present in selected zone.
Example:
instanceType: t3.large
- stringwithNAT.bastionInstance.zone
The zone in which the bastion instance will be created.
By default, the first available zone in the region or the first from the list of the global parameter
zoneswill be used.
- objectwithoutNAT
- array of stringszones
The globally restricted set of zones that this cloud provider works with.
Restricts only the creation of nodes in the cluster.