Skip to content

Configuration reference🔗︎

This document contains a reference of the Kubitect configuration file and documents all possible configuration properties.

The configuration sections are as follows:

  • hosts - A list of physical hosts (local or remote).
  • cluster - Configuration of the cluster infrastructure. Virtual machine properties, node types to install, and the host on which to install the nodes.
  • kubernetes - Kubernetes configuration.
  • addons - Configurable addons and applications.

Each configuration property is documented with 5 columns: Property name, description, type, default value and is the property required.

Note

[*] annotates an array.

Hosts section🔗︎

Name Type Default value Required? Description
hosts[*].connection.ip string Yes, if connection.type is set to remote IP address is used to SSH into the remote machine.
hosts[*].connection.ssh.keyfile string ~/.ssh/id_rsa Path to the keyfile that is used to SSH into the remote machine
hosts[*].connection.ssh.port number 22 The port number of SSH protocol for remote machine.
hosts[*].connection.ssh.verify boolean false If true, the SSH host is verified, which means that the host must be present in the known SSH hosts.
hosts[*].connection.type string Yes Possible values are:
  • local or localhost
  • remote
hosts[*].connection.user string Yes, if connection.type is set to remote Username is used to SSH into the remote machine.
hosts[*].dataResourcePools[*].name string Name of the data resource pool. Must be unique within the same host. It is used to link virtual machine volumes to the specific resource pool.
hosts[*].dataResourcePools[*].path string /var/lib/libvirt/images/ Host path to the location where data resource pool is created.
hosts[*].default boolean false Nodes where host is not specified will be installed on default host. The first host in the list is used as a default host if none is marked as a default.
hosts[*].name string Yes Custom server name used to link nodes with physical hosts.
hosts[*].mainResourcePoolPath string /var/lib/libvirt/images/ Path to the resource pool used for main virtual machine volumes.

Cluster section🔗︎

Name Type Default value Required? Description
cluster.name string Yes Custom cluster name that is used as a prefix for various cluster components.
Note: cluster name cannot contain prefix local.
cluster.network.bridge string virbr0 By default virbr0 is set as a name of virtual bridge. In case network mode is set to bridge, name of the preconfigured bridge needs to be set here.
cluster.network.cidr string Yes Network cidr that contains network IP with network mask bits (IPv4/mask_bits).
cluster.network.gateway string First client IP in network. By default first client IP is taken as a gateway. If network cidr is set to 10.0.0.0/24 then gateway would be 10.0.0.1. Set gateway if it differs from default value.
cluster.network.mode string Yes Network mode. Possible values are:
  • nat - Creates virtual local network.
  • bridge - Uses preconfigured bridge interface on the machine (Only bridge mode supports multiple hosts).
  • route - Creates virtual local network, but does not apply NAT.
cluster.nodes.loadBalancer.default.cpu number 2 Default number of vCPU allocated to a load balancer instance.
cluster.nodes.loadBalancer.default.mainDiskSize number 32 Size of the main disk (in GiB) that is attached to a load balancer instance.
cluster.nodes.loadBalancer.default.ram number 4 Default amount of RAM (in GiB) allocated to a load balancer instance.
cluster.nodes.loadBalancer.forwardPorts[*].name string Yes, if port is configured Unique name of the forwarded port.
cluster.nodes.loadBalancer.forwardPorts[*].port number Yes, if port is configured Incoming port is the port on which a load balancer listens for the incoming traffic.
cluster.nodes.loadBalancer.forwardPorts[*].targetPort number Incoming port value Target port is the port on which a load balancer forwards traffic.
cluster.nodes.loadBalancer.forwardPorts[*].target string workers Target is a group of nodes on which a load balancer forwards traffic. Possible targets are:
  • masters
  • workers
  • all
cluster.nodes.loadBalancer.instances[*].cpu number Overrides a default value for that specific instance.
cluster.nodes.loadBalancer.instances[*].host string Name of the host on which the instance is deployed. If the name is not specified, the instance is deployed on the default host.
cluster.nodes.loadBalancer.instances[*].id string Yes Unique identifier of a load balancer instance.
cluster.nodes.loadBalancer.instances[*].ip string If an IP is set for an instance then the instance will use it as a static IP. Otherwise it will try to request an IP from a DHCP server.
cluster.nodes.loadBalancer.instances[*].mac string MAC used by the instance. If it is not set, it will be generated.
cluster.nodes.loadBalancer.instances[*].mainDiskSize number Overrides a default value for that specific instance.
cluster.nodes.loadBalancer.instances[*].priority number 10 Keepalived priority of the load balancer. A load balancer with the highest priority becomes the leader (active). The priority can be set to any number between 0 and 255.
cluster.nodes.loadBalancer.instances[*].ram number Overrides a default value for the RAM for that instance.
cluster.nodes.loadBalancer.vip string Yes, if more then one instance of load balancer is specified. Virtual IP (floating IP) is the static IP used by load balancers to provide a fail-over. Each load balancer still has its own IP beside the shared one.
cluster.nodes.loadBalancer.virtualRouterId number 51 Virtual router ID identifies the group of VRRP routers. It can be any number between 0 and 255 and should be unique among different clusters.
cluster.nodes.master.default.cpu number 2 Default number of vCPU allocated to a master node.
cluster.nodes.master.default.labels dictionary Array of default node labels that are applied to all master nodes.
cluster.nodes.master.default.mainDiskSize number 32 Size of the main disk (in GiB) that is attached to a master node.
cluster.nodes.master.default.ram number 4 Default amount of RAM (in GiB) allocated to a master node.
cluster.nodes.master.default.taints list List of default node taints that are applied to all master nodes.
cluster.nodes.master.instances[*].cpu number Overrides a default value for that specific instance.
cluster.nodes.master.instances[*].dataDisks[*].name string Name of the additional data disk that is attached to the master node.
cluster.nodes.master.instances[*].dataDisks[*].pool string main Name of the data resource pool where the additional data disk is created. Referenced resource pool must be configure on the same host.
cluster.nodes.master.instances[*].dataDisks[*].size string Size of the additional data disk (in GiB) that is attached to the master node.
cluster.nodes.master.instances[*].host string Name of the host on which the instance is deployed. If the name is not specified, the instance is deployed on the default host.
cluster.nodes.master.instances[*].id string Yes Unique identifier of a master node.
cluster.nodes.master.instances[*].ip string If an IP is set for an instance then the instance will use it as a static IP. Otherwise it will try to request an IP from a DHCP server.
cluster.nodes.master.instances[*].labels dictionary Array of node labels that are applied to this specific master node.
cluster.nodes.master.instances[*].mac string MAC used by the instance. If it is not set, it will be generated.
cluster.nodes.master.instances[*].mainDiskSize number Overrides a default value for that specific instance.
cluster.nodes.master.instances[*].ram number Overrides a default value for the RAM for that instance.
cluster.nodes.master.instances[*].taints list List of node taints that are applied to this specific master node.
cluster.nodes.worker.default.cpu number 2 Default number of vCPU allocated to a worker node.
cluster.nodes.worker.default.labels dictionary Array of default node labels that are applied to all worker nodes.
cluster.nodes.worker.default.mainDiskSize number 32 Size of the main disk (in GiB) that is attached to a worker node.
cluster.nodes.worker.default.ram number 4 Default amount of RAM (in GiB) allocated to a worker node.
cluster.nodes.worker.default.taints list List of default node taints that are applied to all worker nodes.
cluster.nodes.worker.instances[*].cpu number Overrides a default value for that specific instance.
cluster.nodes.worker.instances[*].dataDisks[*].name string Name of the additional data disk that is attached to the worker node.
cluster.nodes.worker.instances[*].dataDisks[*].pool string main Name of the data resource pool where the additional data disk is created. Referenced resource pool must be configure on the same host.
cluster.nodes.worker.instances[*].dataDisks[*].size string Size of the additional data disk (in GiB) that is attached to the worker node.
cluster.nodes.worker.instances[*].host string Name of the host on which the instance is deployed. If the name is not specified, the instance is deployed on the default host.
cluster.nodes.worker.instances[*].id string Yes Unique identifier of a worker node.
cluster.nodes.worker.instances[*].ip string If an IP is set for an instance then the instance will use it as a static IP. Otherwise it will try to request an IP from a DHCP server.
cluster.nodes.worker.instances[*].labels dictionary Array of node labels that are applied to this specific worker node.
cluster.nodes.worker.instances[*].mac string MAC used by the instance. If it is not set, it will be generated.
cluster.nodes.worker.instances[*].mainDiskSize number Overrides a default value for that specific instance.
cluster.nodes.worker.instances[*].ram number Overrides a default value for the RAM for that instance.
cluster.nodes.worker.instances[*].taints list List of node taints that are applied to this specific worker node.
cluster.nodeTemplate.cpuMode string custom Guest virtual machine CPU mode.
cluster.nodeTemplate.dns list Value of network.gateway Custom DNS list used by all created virtual machines. If none is provided, network gateway is used.
cluster.nodeTemplate.os.distro string ubuntu22 Set OS distribution. Possible values are:
  • ubuntu20
  • ubuntu22
  • debian11
  • debian12
  • centos9
  • rocky9
cluster.nodeTemplate.os.networkInterface string Depends on os.distro Network interface used by virtual machines to connect to the network. Network interface is preconfigured for each OS image (usually ens3 or eth0). By default, the value from distro preset (/terraform/defaults.yaml) is set, but can be overwritten if needed.
cluster.nodeTemplate.os.source string Depends on os.distro Source of an OS image. It can be either path on a local file system or an URL of the image. By default, the value from distro preset (/terraform/defaults.yaml)isset, but can be overwritten if needed.
cluster.nodeTemplate.ssh.addToKnownHosts boolean false If set to true, each virtual machine will be added to the known hosts on the machine where the project is being run. Note that all machines will also be removed from known hosts when destroying the cluster.
cluster.nodeTemplate.ssh.privateKeyPath string Path to private key that is later used to SSH into each virtual machine. On the same path with .pub prefix needs to be present public key. If this value is not set, SSH key will be generated in ./config/.ssh/ directory.
cluster.nodeTemplate.updateOnBoot boolean true If set to true, the operating system will be updated when it boots.
cluster.nodeTemplate.user string k8s User created on each virtual machine.

Kubernetes section🔗︎

Name Type Default value Required? Description
kubernetes.dnsMode string coredns DNS server used within a Kubernetes cluster. Possible values are:
  • coredns
kubernetes.manager string kubespray Manager that is used for deploying Kubernetes cluster. Possible values are:
  • kubespray
  • k3s
kubernetes.networkPlugin string calico Network plugin used within a Kubernetes cluster. Possible values are:
  • calico
  • cilium
  • flannel
  • kube-router
Note: k3s manager currently supports only flannel.
kubernetes.other.autoRenewCertificates boolean false When this property is set to true, control plane certificates are renewed first Monday of each month.
kubernetes.other.mergeKubeconfig boolean false When this property is set to true, the kubeconfig of a new cluster is merged to the config on path ~/.kube/config.
kubernetes.version string v1.28.6 Kubernetes version that will be installed.

Addons section🔗︎

Name Type Default value Required? Description
addons.kubespray dictionary Kubespray addons configuration.
addons.rook.enabled boolean false Enable Rook addon.
addons.rook.nodeSelector dictionary Dictionary containing node labels ("key: value"). Rook is deployed on the nodes that match all the given labels.
addons.rook.version string Rook version. By default, the latest release version is used.