Kubeone on baremetal with Flatcar

Hello,

I was wondering if anyone has any pointer as to how to use KubeOne on baremetal with Flatcaros. I have a current setup with Terraform and matchbox provider to install FlatcarOS on a number of nodes but I’m not sure how KubeOne will fit into the picture.

Any pointers will be highly appreciated.

Hi!

Since usually in baremetal setting there is no API to talk to (using terraform), you going to need to write the kubeone.yaml file manually, which will point kubeone to the right machines SSH. It’s doesn’t matter if it’s Flatcar or Ubuntu if it’s supported, but the OS should already exists before kubeone launch.

But since you do have terraform, all you need is to write terraform output in correct format so kubeone could read it. The format is documented here https://docs.kubermatic.com/kubeone/master/infrastructure/terraform_integration/ and there are multiple examples (output.tf files) in https://github.com/kubermatic/kubeone/tree/master/examples/terraform.

1 Like

Thanks a lot for the reply!

So what this boils down to ifs for me to have my servers and load balancer provisioned already before pointing KubeOne to it.

If I can understand this better, I will need to create 2 files manually,

  • Kubeone.yaml manifest file

  • Terraform output file

Please confirm.

Also, I have a working prototype of using Terraform and matchbox provider to provision baremetal servers. Does that mean I can use the terraform output file from that and just create the manifest file?

Yep.

Yes indeed.

If your terraform outputs conform the docs I’ve linked previously then yes.

Awesome! Thanks a lot.

@zeemba In case you are interested. I have deployed k8s with kubeone on Flatcare VMs.
It’s not bare-metal (I have flatcar VMs on ESXI, but it feels like bare metal).

What you need to do for it is just using the kubeone static worker configuration.
Just add the IPs by yourself and then trigger a kubeone apply --manifest kubeone.yaml.
This should bootstrap the cluster on all machines. Remember to provide a loadbalancer for the KubeAPI

1 Like

Here’s the relevant doc that @shibumi is talking about.