{% if $clusterstackrelease.name.isLatest %} ## You are up to date! 🎉 If you wish to upgrade from an old ClusterStack version, please go to the version selector on top of the navigation and select your current version. {% else $clusterstackrelease.version.isLatest /%} ## You are on the latest ClusterStackRelease! 🎉 Right now you are on the latest ClusterStackRelease available for Kubernetes `1.34`. If you wish to upgrade from an old ClusterStackRelease version, please go to the version selector on top of the navigation and select your version. If you want to upgrade the Kubernetes version instead, visit the [Updating the cluster to a new Kubernetes version](/docs/hetzner/apalla/how-to-guides/update-clusters/update-cluster-to-a-new-kubernetes-version) guide. {% else /%} ## Introduction to ClusterStack Releases Syself is releasing a new version of the ClusterStacks every two to three weeks. These releases may contain minor updates, such as a Kubernetes patch version, or the version of some cluster components or node images. This guide will detail the process of updating from to `v6`. ## Preparing the clusterstack object Check if `autoSubscribe` is set to `true` or `false` in your clusterstack object and follow the steps for your case: {% callout %} The `autoSubscribe` key in the clusterstack object indicates that Syself Autopilot will automatically fetch the latest ClusterStackRelease version and make it available for use. {% /callout %} {% tabs #autosubscribe %} {% tab title="autosubscribe: true" %} {% if equals($clusterstackrelease.version.latest, $upgradepath.version.currentminor.next) %} The latest version is automatically available for you. You don't need to do anything. Keep reading the next steps. {% else /%} The latest version is automatically available for you, but you still need to specify the versions in between. For that, add [] to the `spec.versions` array in your ClusterStack: ```yaml {% persistBlur=true %} /// clusterstack.yaml apiVersion: clusterstack.x-k8s.io/v1alpha1 kind: ClusterStack metadata: name: hetzner-apalla-1-34 spec: provider: hetzner name: apalla kubernetesVersion: '1.34' channel: stable autoSubscribe: true versions: [] // [!code focus] providerRef: name: hetzner-apalla-1-34 kind: HetznerClusterStackReleaseTemplate apiVersion: infrastructure.clusterstack.x-k8s.io/v1alpha1 ``` {% /if %} {% /tab %} {% tab title="autosubscribe: false" %} {% if equals($clusterstackrelease.version.latest, $upgradepath.version.currentminor.next) %} You can go to the latest version directly. To make it available, add `v6` to the versions array in your ClusterStack object: ```yaml {% persistBlur=true %} /// clusterstack.yaml apiVersion: clusterstack.x-k8s.io/v1alpha1 kind: ClusterStack metadata: name: hetzner-apalla-1-34 spec: provider: hetzner name: apalla kubernetesVersion: '1.34' channel: stable autoSubscribe: true versions: ["v6"] // [!code focus] providerRef: name: hetzner-apalla-1-34 kind: HetznerClusterStackReleaseTemplate apiVersion: infrastructure.clusterstack.x-k8s.io/v1alpha1 ``` {% else /%} You need to specify the ClusterStackRelease versions in between using the `spec.versions` array in your ClusterStack object. The following is the complete (and shortest) tested upgrade path to go from your current version to `hetzner-apalla-1-34-v6`: ```yaml {% persistBlur=true %} /// clusterstack.yaml apiVersion: clusterstack.x-k8s.io/v1alpha1 kind: ClusterStack metadata: name: hetzner-apalla-1-34 spec: provider: hetzner name: apalla kubernetesVersion: '1.34' channel: stable autoSubscribe: false versions: [] // [!code focus] providerRef: name: hetzner-apalla-1-34 kind: HetznerClusterStackReleaseTemplate apiVersion: infrastructure.clusterstack.x-k8s.io/v1alpha1 ``` {% /if %} {% /tab %} {% /tabs %} ## Checking the available ClusterStackReleases Check if the `ClusterStackReleases` you need are available with: {% if equals($clusterstackrelease.version.latest, $upgradepath.version.currentminor.next) %} {% terminal height="9.5rem" steps="[{\"command\":\"kubectl get clusterstackrelease\",\"delay\":500,\"output\":\"NAME K8S VERSION READY AGE REASON MESSAGE\\nhetzner-apalla-1-34-v6 v1.34.6 true 2d\\nhetzner-apalla-1-34-v6 v1.34.6 true 1m\"}]" /%} {% else /%} {% terminal height="12rem" steps="[{\"command\":\"kubectl get clusterstackrelease\",\"delay\":500,\"output\":\"NAME K8S VERSION READY AGE REASON MESSAGE\\nhetzner-apalla-1-34-v6 v1.34.6 true 2d\\n... ... true 1m\\nhetzner-apalla-1-34-v6 v1.34.6 true 1m\"}]" /%} {% /if %} Note down the values of the `NAME` and `K8S VERSION` columns from the release you want to upgrade to. In this case, `hetzner-apalla-1-34-v6` and `v1.34.6`. ## Upgrading the cluster object Edit your cluster and change the `spec.topology.class` and `spec.topology.version` to match the `NAME` and `K8S VERSION` of the ClusterStackRelease, respectively. This can be achieved either by editing the resource inside the management cluster, or by updating it in your GitOps repository. {% if equals($upgradepath.kubernetes.currentminor.next, $upgradepath.kubernetes.currentminor.latest) %} In this case, you only need to update one version. ```yaml {% persistBlur=true %} /// cluster.yaml apiVersion: cluster.x-k8s.io/v1beta1 kind: Cluster metadata: name: mycluster spec: topology: class: {% $upgradepath.clusterstackrelease.currentminor.next %} // [!code focus:2] version: {% $upgradepath.kubernetes.currentminor.next %} controlPlane: replicas: 3 workers: machineDeployments: - class: workeramd64hcloud name: md-0 replicas: 1 failureDomain: nbg1 variables: overrides: - name: workerMachineTypeHcloud value: cpx42 variables: - name: region value: nbg1 - name: controlPlaneMachineTypeHcloud value: cpx42 ``` {% else /%} {% timeline /%} {% /if %} Now, your cluster will be updated (with no downtime!) to the cluster stack version you specified. If you need to update to another version, wait for the current update process to finish. You can check if it's done by checking the nodes in your cluster: {% terminal height="5rem" steps="[\"kubectl get nodes\"]" /%} If you still have old nodes, this means the update is in progress. In this case, wait until the output shows only new nodes. {% /if %}