GCPClusterConfiguration
Version: deckhouse.io/v1
Describes the configuration of a cloud cluster in GCP.
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:
kubectl -n d8-system exec -ti deploy/deckhouse -- deckhouse-controller edit provider-cluster-configuration
Example:
apiVersion: deckhouse.io/v1
kind: GCPClusterConfiguration
layout: WithoutNAT
sshKey: "<SSH_PUBLIC_KEY>"
subnetworkCIDR: 10.36.0.0/24
masterNodeGroup:
replicas: 1
zones:
- europe-west3-b
instanceClass:
machineType: n1-standard-4
image: projects/ubuntu-os-cloud/global/images/ubuntu-2204-jammy-v20220831
diskSizeGb: 20
nodeGroups:
- name: static
replicas: 1
zones:
- europe-west3-b
instanceClass:
machineType: n1-standard-4
image: projects/ubuntu-os-cloud/global/images/ubuntu-2204-jammy-v20220831
diskSizeGb: 20
additionalNetworkTags:
- tag1
additionalLabels:
kube-node: static
provider:
region: europe-west3
serviceAccountJSON: "<SERVICE_ACCOUNT_JSON>"
- apiVersionstring
Required value
Allowed values:
deckhouse.io/v1
,deckhouse.io/v1alpha1
- kindstring
Required value
Allowed values:
GCPClusterConfiguration
- labelsobject
A list of labels to attach to cluster resources.
Note that you have to re-create all the machines to add new tags if tags were modified in the running cluster.
You can learn more about the labels in the official documentation.
Format —
key: value
. - layoutstring
Required value
The way resources are located in the cloud.
Standard
- set Cloud NAT mode. More info…WithoutNAT
- a dedicated VPC is created for the cluster. All cluster nodes have public IP addresses. More info…Allowed values:
Standard
,WithoutNAT
- masterNodeGroupobject
Required value
Parameters of the master’s NodeGroup.
Caution! After changing the parameters of the section, you need to run
dhctl converge
for the changes to take effect.- masterNodeGroup.additionalLabelsobject
Additional labels.
Example:
project: cms-production severity: critical
- array of strings
The list of additional tags.
For example, you can use tags to apply firewall rules to instances. The detailed description of network tags is available in the official documentation.
- masterNodeGroup.instanceClassobject
Required value
Partial contents of the GCPInstanceClass fields.
- masterNodeGroup.instanceClass.disableExternalIPboolean
Defines whether to disable external IP for an instance or not.
This parameter is only available for the
Standard
layout.True means that nodes do not have public addresses and connect to the Internet over
CloudNAT
;False means that static public addresses are created for nodes, they are also used for One-to-one NAT.;
Default:
true
Allowed values:
true
,false
- masterNodeGroup.instanceClass.diskSizeGbinteger
Instance disk size in gigabytes.
Example:
diskSizeGb: 20
- masterNodeGroup.instanceClass.imagestring
Required value
Image to use while provisioning GCP servers.
You can find a list of images in the documentation.
Caution! Currently, only
Ubuntu 18.04
,Ubuntu 20.04
,Ubuntu 22.04
,Centos 7
,Centos 8
,Centos 9
,Debian 9
,Debian 10
,Debian 11
are supported and tested to work.Example:
image: projects/ubuntu-os-cloud/global/images/ubuntu-1804-bionic-v20190911
- masterNodeGroup.instanceClass.machineTypestring
Required value
Machine type of GCP instance.
Caution! Make sure that this type is present in all zones specified in the
zones
parameter.GCP lets you specify a custom amount of resources (CPU and RAM), e.g.,
custom-8-40960
orn2-custom-8-40960
.Example:
machineType: n1-standard-4
- masterNodeGroup.instanceClass.disableExternalIPboolean
- masterNodeGroup.replicasinteger
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
- masterNodeGroup.zonesarray of strings
A limited set of zones in which nodes can be created.
- masterNodeGroup.additionalLabelsobject
- nodeGroupsarray of objects
An array of additional NodeGroups for creating static nodes (e.g., for dedicated front nodes or gateways).
- nodeGroups.additionalLabelsobject
- array of strings
- nodeGroups.instanceClassobject
Required value
Partial contents of the GCPInstanceClass fields.
- nodeGroups.instanceClass.disableExternalIPboolean
Defines whether to disable external IP for an instance or not.
This parameter is only available for the
Standard
layout.True means that nodes do not have public addresses and connect to the Internet over
CloudNAT
;False means that static public addresses are created for nodes, they are also used for One-to-one NAT.;
Default:
true
Allowed values:
true
,false
- nodeGroups.instanceClass.diskSizeGbinteger
Instance disk size in gigabytes.
Example:
diskSizeGb: 20
- nodeGroups.instanceClass.imagestring
Required value
Image to use while provisioning GCP servers.
You can find a list of images in the documentation.
Caution! Currently, only
Ubuntu 18.04
,Ubuntu 20.04
,Ubuntu 22.04
,Centos 7
,Centos 8
,Centos 9
,Debian 9
,Debian 10
,Debian 11
are supported and tested to work.Example:
image: projects/ubuntu-os-cloud/global/images/ubuntu-1804-bionic-v20190911
- nodeGroups.instanceClass.machineTypestring
Required value
Machine type of GCP instance.
Caution! Make sure that this type is present in all zones specified in the
zones
parameter.GCP lets you specify a custom amount of resources (CPU and RAM), e.g.,
custom-8-40960
orn2-custom-8-40960
.Example:
machineType: n1-standard-4
- nodeGroups.instanceClass.disableExternalIPboolean
- nodeGroups.namestring
Required value
The name of the NodeGroup to use for generating node names.
- nodeGroups.nodeTemplateobject
Parameters of Node objects in Kubernetes to add after registering the node.
- nodeGroups.nodeTemplate.annotationsobject
The same as the
metadata.annotations
(https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#objectmeta-v1-meta). - nodeGroups.nodeTemplate.labelsobject
The same as the
metadata.labels
standard (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#objectmeta-v1-meta). - nodeGroups.nodeTemplate.taintsarray of objects
The same as the
.spec.taints
field of the Node object(https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#taint-v1-core). CAUTION! Only theeffect
,key
,values
fields are available- nodeGroups.nodeTemplate.taints.effectstring
Allowed values:
NoSchedule
,PreferNoSchedule
,NoExecute
- nodeGroups.nodeTemplate.taints.keystring
- nodeGroups.nodeTemplate.taints.valuestring
- nodeGroups.nodeTemplate.taints.effectstring
- nodeGroups.nodeTemplate.annotationsobject
- nodeGroups.replicasinteger
Required value
The number of nodes to create.
- nodeGroups.zonesarray of strings
A limited set of zones in which nodes can be created.
- peeredVPCsarray of strings
A list of GCP VPC networks 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.
- providerobject
Required value
Parameters for connecting to the GCP API.
- provider.regionstring
Required value
The name of the region where instances will be provisioned.
- provider.serviceAccountJSONstring
Required value
A key to the Service Account with Project Admin privileges (
service account key
) in the JSON format.How to create it a
service account key
.
- provider.regionstring
- sshAllowListarray of strings
A list of CIDR’s allowed to connect to nodes via ssh.
By default, from any.
- sshKeystring
Required value
A public key to access nodes as
user
. - standardobject
Settings for the
Standard
layout.- standard.cloudNATAddressesarray of strings
A list of public static IP addresses for
Cloud NAT
.
- standard.cloudNATAddressesarray of strings
- subnetworkCIDRstring
A subnet to use for cluster nodes.
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]))$
- withoutNATobject
Settings for the
WithoutNAT
layout. - zonesarray of strings
A limited set of zones in which nodes can be created.