This document describes some of the possible approaches for managing the
infrastructure needed for a Kubernetes cluster.
Infrastructure For Control Plane
It’s the user’s responsibility to create and manage the infrastructure for the
control plane. In order to help with this, KubeOne integrates with Terraform by
reading the information about the infrastructure from the Terraform state, and
provides example Terraform configurations that can be used to get started. The
example Terraform configs can be found in the KubeOne’s GitHub repository.
The example Terraform configurations are optimized for the CI and might not
be production-ready out of the box. We advise checking the
document for more details about making the example configurations suitable for
the production usage.
If you’re using our example Terraform configs, requirements are satisfied
out of the box.
The following infrastructure requirements must be satisfied to successfully
provision a Kubernetes cluster using KubeOne:
You need the appropriate number of instances dedicated for the control plane
You need odd number of instances with a minimum of three instances
for the Highly-Available control plane
If you decide to use a single-node control plane instead, one instance is
enough, however, highly-available control plane is highly advised,
especially in the production environments
using KubeOne Static Workers, by using the preferred tooling to create
instances (e.g. Terraform) and then provision them using KubeOne
Using Kubermatic machine-controller is highly advised if your provider is
Otherwise, KubeOne Static Workers are recommended instead.
More details about the machine-controller and the Cluster-API can be found in
the Concepts document.
The requirements for the worker instances are similar as for the control
To use the integration, you need to generate a Terraform state file using the
terraform output -json command. KubeOne consumes the generated Terraform
state file and reads the needed information. Therefore, the generated file
must strictly follow the format used by KubeOne. To accomplish this, you
must have the appropriate output.tf file co-located with other Terraform
files. The output.tf file defines the template for generating the state file, including where to look for the information about the infrastructure.