A Cluster Stack is like a blueprint for all objects and configuration needed to create a cluster. For each release, this objects and configurations are heavily tested by Syself to guarantee integrity and interoperability.
The first step for cluster creation is making a Cluster Stack Release available. Create a file named clusterstack.yaml
, with the following content:
And apply it to the management cluster:
When a ClusterStack is applied, a ClusterStackRelease is created from it, and the necessary components starts to be prepared in your Hetzner account. In our case, we applied a ClusterStack with autoSubscribe
set to true, so it'll fetch the latest release and create the ClusterStackRelease object based on that. You don't need to interact directly with the release.
It takes around 5 minutes for the ClusterStackRelease to be ready, as the node images are being built. You can check the status of these node images by running kubectl get HetznerNodeImageReleases
. These objects have a one-to-one relationship with the snapshots in your Hetzner project, which you can view under Servers / Snapshots in the Hetzner Console.
If you already have a ClusterStack applied from a previous cluster, there is no need to apply it again since the HetznerNodeImageReleases and ClusterStackRelease are already there. You can use the same release and node images for any number of clusters.
After the node images are successfully built, the ClusterStackRelease hetzner-apalla-1-30-v5 will be ready for you to use in your cluster. Check with:
Now that we have a Cluster Stack Release ready, we can create a cluster from it. For that, create a cluster.yaml
file with the contents below, replacing the <SSH_KEY_NAME>
with the one you configured in the Account Preparation guide:
And apply it to the management cluster with:
Cluster creation will take a few more minutes. You can monitor the process by looking at the machine objects:
These represent actual machines in your Hetzner project. If all of them are in the Running
phase, it means your cluster is ready!
To get the kubeconfig of your workload cluster, you can use the command:
When accessing your cluster, you may see some pods still pending. This is normal, you just have to wait for it to be completely initialized. When all pods are running and the four nodes are in ready state, it means your cluster is completely provisioned.
And that's it! Now you have a production-ready, highly available Kubernetes cluster managed by Syself Autopilot. And since everything is defined using Kubernetes manifests, you can have your entire cluster configuration managed with GitOps, using your favorite tools.
Deploy the sample pod to your cluster:
And create a port forwarding to access it:
Now, go to http://localhost:8080 in your browser.
In the Cluster configuration section you can find tutorials for common tasks you might want to do in your cluster. We recommend you go over it after creating your first cluster.