{#if minor === stack.latest.minor} You are seeing the documentation for Kubernetes 1.37 — the newest Kubernetes minor Syself Autopilot supports right now. If your cluster is already on this version, there's nothing to do. Not on this version? Documentation is tailored to each Cluster Stack release. Pick your cluster's actual version to jump straight to the guide that applies to it: {#if release !== stack.latest} ## Already on this Kubernetes version but want the latest Cluster Stack release for it? See [Updating the cluster with same Kubernetes version](/docs/hetzner/apalla/clusters/upgrades/update-within-a-version) to get the latest Cluster Stack release for Kubernetes 1.37. {/if} ## Not sure which Kubernetes version your cluster is on? If you're not sure which Kubernetes version your cluster is currently on, check it directly: Check in your cluster Run these commands against the Syself Autopilot management cluster, not the workload cluster. To check one cluster: ```console $ kubectl get cluster -n \ -o jsonpath='{.spec.topology.classRef.name}{"\n"}' ``` The command returns the Cluster Stack release name: ```console vars hetzner-apalla-1-37-v1 ``` The name includes the provider, stack, Kubernetes minor version, and Cluster Stack release. The final `vN` segment identifies the Cluster Stack release. To check every cluster: ```console $ kubectl get clusters -A \ -o custom-columns='NAMESPACE:.metadata.namespace,CLUSTER:.metadata.name,CLUSTERSTACK:.spec.topology.classRef.name,KUBERNETES:.spec.topology.version' ``` **If the management cluster serves `cluster.x-k8s.io/v1beta1`**: If the Syself Autopilot management cluster serves `cluster.x-k8s.io/v1beta1` instead of `v1beta2`, use `spec.topology.class` instead of `spec.topology.classRef.name`. To check one cluster with `cluster.x-k8s.io/v1beta1`: ```console $ kubectl get cluster -n \ -o jsonpath='{.spec.topology.class}{"\n"}' ``` To check every cluster with `cluster.x-k8s.io/v1beta1`: ```console $ kubectl get clusters -A \ -o custom-columns='NAMESPACE:.metadata.namespace,CLUSTER:.metadata.name,CLUSTERSTACK:.spec.topology.class,KUBERNETES:.spec.topology.version' ``` Match the docs to your version If it doesn't show 1.37, switch the docs to your cluster's actual version using the picker below: An upgrade guide scoped to that version will walk you through the upgrade path to get here. ## Explore further Exactly which components and versions hetzner-apalla-1-37-v1 ships. {:else if upgrade.toNextMinor.length === 0 || upgrade.toNextMinor[0] !== upgrade.nextMinorEntry} You are viewing documentation for Kubernetes 1.37, Cluster Stack release hetzner-apalla-1-37-v1. ## Update your Cluster Stack release first To upgrade to Kubernetes {nextMinor?.version}, first update your cluster to Cluster Stack release hetzner-apalla-1-37-v1 by following this guide: [Updating the cluster with same Kubernetes version](/docs/hetzner/apalla/clusters/upgrades/update-within-a-version). Once that update is complete, return to this guide to upgrade your Kubernetes version. ## Not sure which version your cluster uses? Run this against the Syself Autopilot management cluster, not the workload cluster: ```console $ kubectl get clusters -A ``` The `CLUSTERCLASS` column shows the Cluster Stack release and `VERSION` shows the Kubernetes version. Select that version in the picker at the top of this page. {:else} {#if nextMinor?.version === '1.37'} Upgrading replaces every node once with the new node image, and your workloads keep running through it. Once you apply the change there is no rollback, so go through the breaking changes and the other changes below first. Read [What's New in Syself Autopilot 1.37](/resources/whats-new-syself-autopilot-1-37) for the full release notes, and the [1.37 version hub](/versions/1-37) for every component and version it ships. ## Breaking changes These change how some workloads run on 1.37. If one describes your cluster, change it before you upgrade. - **[Pods on the `standard` runtime that crun refuses to start](#standard-runtime-pods-that-crun-refuses-to-start).** The `standard` runtime class now uses `crun` 1.31. It refuses to start a pod that mounts a volume at a path that does not exist inside a read-only volume, or a pod that sets `hostUsers: false` and runs programs from `/dev/shm`. Update those pod specs. - **[Kata Containers pods get a 512Mi memory limit by default](#kata-containers-pods-secure-runtime-class).** In pods that use the `secure` runtime class (Kata Containers), a container that sets no memory limit now gets a 512Mi limit and is OOM-killed above it. Before, every such pod got a 2 GiB VM. Set `resources.limits.memory` on those containers, and check that the nodes running Kata pods have room for the larger memory reservation per pod (768Mi instead of 160Mi). - **[Host tools and SCTP removed from the node image](#host-tools-and-sctp-removed-from-the-node-image).** The node image no longer ships `sudo`, setuid or setgid binaries, or host tools a node does not use, and it blocks SCTP. If a privileged DaemonSet or a host script calls one of these tools, or an application opens SCTP sockets, update it. Workloads that run only inside their containers are not affected. - **[Load balancers resized in the Hetzner console go back to `lb11`](#load-balancers-resized-in-the-hetzner-console).** The `load-balancer.hetzner.cloud/type` annotation on a Service now decides the type of its load balancer, and a Service without it gets an `lb11`. A load balancer that does not fit an `lb11` stops getting new targets and has none left once the old nodes are replaced. Set the annotation on every Service whose load balancer is larger than `lb11`. - **[TopoLVM installed under a release name other than `csi-local` or outside `kube-system`](#local-storage-on-bare-metal).** TopoLVM is now a built-in Cluster Stack component. The upgrade migrates the install the Syself docs describe, the release `csi-local` in `kube-system`. An install under any other release name or in another namespace conflicts with the built-in TopoLVM: PVC creation fails, or the upgrade does not start. Remove such an install right before you upgrade. Also delete any `local-nvme`, `local-ssd`, or `local-hdd` StorageClass you customized, or the upgrade stalls. ## Other changes These don't break running workloads, but review them so traffic doesn't change unexpectedly. - **[Services that set a traffic distribution](#services-with-a-traffic-distribution-setting).** The cluster now honors `spec.trafficDistribution` and the `service.kubernetes.io/topology-mode` annotation, so a Service that sets either one prefers endpoints on the client's node or zone after the upgrade. Check those Services and keep, change, or remove the setting. - **[Direct NodePort access to LoadBalancer Services](#nodeport-of-a-loadbalancer-service).** Once every control plane runs 1.37, the NodePort of a `type: LoadBalancer` Service accepts traffic only from its load balancer. If clients reach that NodePort on a node IP directly, route them through the load balancer or opt the Service out. If you're not sure whether one of these applies to you, create a new cluster on {nextMinor?.version} first, deploy your workloads there, and confirm they run before you upgrade a running cluster. {/if} ## Upgrade the cluster ### 1. Scan for deprecated and removed APIs Kubernetes removes API versions in minor releases. If your workloads or Helm charts still reference a removed API version, they will stop working after the upgrade. The scans use two tools: [pluto](https://github.com/FairwindsOps/pluto) for manifests and Helm releases, and [kubent](https://github.com/doitintl/kube-no-trouble) for the running cluster. Install both before you start. Run a static scan against your manifests and Helm releases: ```console $ pluto detect-files -d ./manifests $ pluto detect-helm ``` Run a live scan against the running cluster for objects using soon-to-be-removed APIs: ```console $ kubent ``` Fix every finding before you proceed. Updating a manifest after the API is removed requires extra recovery steps. ### 2. Edit the cluster object {#if nextMinor?.version === '1.37'} > [!CAUTION] > Once you apply the version change, the upgrade rolls out to the end and there is no rollback. Before you apply it, reverting the version in the `Cluster` spec is fine. After that, if a roll stalls, leave the spec in place and contact support. {/if} {#if upgrade.nextMinorEntry === nextMinor?.latest} Change your cluster's `spec.topology.classRef.name` to {upgrade.nextMinorEntry?.name}, as shown below. > [!NOTE] > The manifest below uses `cluster.x-k8s.io/v1beta2`, the current API version for cluster manifests. `v1beta1` keeps working for now, but Syself recommends migrating: see [Migrate a manifest to v1beta2](/docs/hetzner/apalla/clusters/upgrades/migrate-a-manifest-to-v1beta2). ```yaml vars persistBlur title="cluster.yaml" apiVersion: cluster.x-k8s.io/v1beta2 kind: Cluster metadata: name: mycluster spec: topology: classRef: name: {upgrade.nextMinorEntry?.name} controlPlane: replicas: 3 workers: machineDeployments: - class: workeramd64hcloud name: md-0 ... ``` {:else} This upgrade spans several releases. Change your cluster's `spec.topology.classRef.name` one release at a time, following the steps below. {/if} This can be achieved either by editing the resource inside the management cluster, or by updating it in your GitOps repository. > [!NOTE] > **Managing your cluster with GitOps**: Syself Autopilot sets `spec.topology.version` from the release that `spec.topology.classRef.name` points at. A version stored in Git therefore goes stale at every update and shows up as drift. Either configure your GitOps tool to ignore the field or change it to {upgrade.nextMinorEntry?.kubernetes} together with the class. See [Fields Syself Autopilot sets for you](/docs/hetzner/apalla/clusters/gitops/overview#fields-syself-autopilot-sets-for-you). Once you apply it, the cluster rolls to the new Kubernetes minor on its own: new nodes come up and the old ones are removed, one at a time. This is the same node replacement that happens during routine self-healing, so a workload set up to tolerate it by having replicas spread across nodes with a `PodDisruptionBudget` faces minimal to zero downtime. ### 3. Confirm the upgrade finished When the roll completes, check that every node reports the new Kubernetes version and `Ready`, and that your workloads still serve traffic: ```console $ kubectl get nodes ``` {#if nextMinor?.version === '1.37'} ## After the upgrade ### Remove the old TopoLVM certificates If your old TopoLVM install was `syself/topolvm 1.3.0`, its webhook certificates and issuers stay in the cluster. The built-in TopoLVM does not use them, and leaving them causes no operational issues. If you want to remove them: ```console $ kubectl -n kube-system delete certificate csi-local-topolvm-mutatingwebhook csi-local-topolvm-webhook-ca $ kubectl -n kube-system delete issuer csi-local-topolvm-webhook-ca csi-local-topolvm-webhook-selfsign $ kubectl -n kube-system delete secret csi-local-topolvm-mutatingwebhook csi-local-topolvm-webhook-ca ``` TopoLVM no longer needs cert-manager. Keep cert-manager installed if other workloads in the cluster issue certificates with it. ### Monitor the new node conditions Nodes now report these new conditions: `NodeActivationFailed`, `BootEntryTampered`, `NodeAgentDegraded`, and `GpuFatalXid`. - `NodeActivationFailed` and `BootEntryTampered` trigger automatic remediation after a minute. - `NodeAgentDegraded` and `GpuFatalXid` do not trigger automatic remediation, so configure alerts for them in your monitoring system. See [Node health conditions](/docs/hetzner/apalla/1-37/observability/reference/node-health-conditions) for what sets each condition and how to alert on it. ### Handle retired bare-metal workers A bare-metal worker that remains unhealthy after two reboots is now retired: its `HetznerBareMetalHost` receives the `capi.syself.com/permanent-error` annotation and is excluded from new machine allocations. After you repair the server, remove the annotation to return it to the pool. See [Machine health checks and remediation](/docs/hetzner/apalla/1-37/servers-and-nodes/maintenance/machine-health-checks-and-remediation). ## Prepare for each breaking change ### Standard runtime pods that crun refuses to start The `standard` runtime class uses `crun` 1.31. Before you upgrade, update any `standard` pods that: - Mount a volume at a nonexistent path inside a read-only `hostPath`, `emptyDir`, or PVC volume. - Set `hostUsers: false` and execute programs from `/dev/shm`. `crun` 1.31 refuses to start pods with either configuration. ### Host tools and SCTP removed from the node image Before you upgrade, check anything that runs on the host itself: a privileged DaemonSet or a script that enters the host namespaces and calls `sudo` or a removed tool, or an application that opens SCTP sockets. A workload that runs only in containers is not affected. The node image no longer ships `sudo`, carries no setuid or setgid binaries, and drops system tools that a Kubernetes node does not use. The removed tools a host script is most likely to call are `setcap`, `getcap`, `capsh`, `debugfs`, `veritysetup`, `nstat`, `ifstat`, `script`, `setarch`, `systemd-nspawn`, `dbus-monitor`, `zstd`, `locate`, `cal`, and `rtcwake`. It also blocks the SCTP kernel module, so opening an SCTP socket fails with `Protocol not supported`. Nothing on the node uses SCTP, and Cilium doesn't support SCTP Services. To debug a node, use `kubectl debug node/` with an image that brings its own tools, as described in [Emergency SSH access](/docs/hetzner/apalla/servers-and-nodes/access/emergency-ssh-access). ### Kata Containers pods (secure runtime class) Pods that set `runtimeClassName: secure` run in a Kata Containers VM. On 1.37, a container in such a pod that sets no `resources.limits.memory` gets a default limit of 512Mi, where before every pod got a 2 GiB VM. The memory the scheduler reserves for each of these pods also rises from 160Mi to 768Mi. Before you upgrade, set explicit memory limits on containers that need more than 512Mi, and check that the nodes running Kata pods have capacity for the higher reservation. The `secure` runtime class no longer gives every pod a 2 GiB VM. Each VM now gets 256 MiB plus the pod's memory limits, and the pod's limit caps the VM itself. These defaults change with it: - A container in a `secure` runtimeClass pod without a memory limit gets a default limit of 512Mi, or its memory request if that is larger. If it exceeds the limit, it is OOM-killed inside its VM. - The pod overhead the scheduler reserves for each `secure` runtimeClass pod rises from 160Mi to 768Mi. The pod's limit now caps the whole VM, so the overhead has to cover the VM's own processes and kernel memory. See [Pod overhead](/docs/hetzner/apalla/1-37/workloads/runtime-classes/container-runtimes#pod-overhead). Both defaults apply to new `secure` pods as soon as the upgrade starts. Running pods keep their old settings until they are recreated. See [Container runtimes](/docs/hetzner/apalla/1-37/workloads/runtime-classes/container-runtimes) for how the runtime classes compare. ### Load balancers resized in the Hetzner console Once every control plane runs 1.37, the cluster switches to a new Hetzner cloud controller. Your load balancers keep their IDs and addresses, and they keep serving during the switch. From then on, the `load-balancer.hetzner.cloud/type` annotation on a Service decides the type of its load balancer, and a Service without the annotation gets an `lb11`. A load balancer that you resized in the Hetzner console is changed back to `lb11`. Before you upgrade, set the annotation on every Service whose load balancer is larger than `lb11`. A load balancer that does not fit an `lb11`, because the Service has more than 5 ports or the cluster has more than 25 nodes, cannot be changed back. The cloud controller then stops updating it: the new nodes of the upgrade are not added as targets, and the load balancer has no targets left once the old nodes are gone. To find the Services without the annotation, run this against the workload cluster: ```console $ kubectl get services -A \ -o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,TYPE:.spec.type,LB-TYPE:.metadata.annotations.load-balancer\.hetzner\.cloud/type' \ | grep 'LoadBalancer *' ``` Compare each Service in the output with its load balancer in the Hetzner console. If the load balancer is larger than `lb11`, set the annotation to the type it has: ```console $ kubectl -n annotate service load-balancer.hetzner.cloud/type=lb21 ``` If a load balancer already lost its targets after the upgrade, the same command brings them back within seconds. See [Keep a larger load balancer type](/docs/hetzner/apalla/1-37/network/load-balancing/configure-a-load-balancer#keep-a-larger-load-balancer-type). ### Local storage on bare metal TopoLVM is now shipped as a part of the Cluster Stack. If you installed it yourself as described in [Set up local NVMe with TopoLVM](/docs/hetzner/apalla/storage/local/local-nvme-with-topolvm), the upgrade migrates your install for you. No volume is recreated, and the data stays on the server. Before you upgrade, check the release name and namespace of your TopoLVM install, your StorageClasses, and your device classes: - **Release name and namespace.** The upgrade migrates only the release `csi-local` in the `kube-system` namespace. An install under another release name or in another namespace stays in the cluster and conflicts with the built-in TopoLVM. [Check your install](/docs/hetzner/apalla/storage/local/remove-a-self-installed-topolvm#check-your-install), and if it differs, [remove it](/docs/hetzner/apalla/storage/local/remove-a-self-installed-topolvm#remove-the-old-install) right before you upgrade. - **StorageClasses.** If you customized a `local-*` StorageClass, delete it before upgrading (`kubectl delete storageclass `). StorageClass parameters are immutable in Kubernetes and cannot be updated in place, so an existing mismatch stalls the upgrade until the class is deleted or matches. The upgrade recreates it with default parameters, and existing volumes are unaffected. - **Device classes.** The built-in TopoLVM uses the same device classes as the syself/topolvm chart (`dc-nvme`, `dc-ssd`, `dc-hdd`). Device classes you changed or added in the old install are replaced by the defaults. The upgrade removes the old `csi-local` workloads and the PVC webhook, and the built-in TopoLVM takes over the existing volumes and the `local-nvme`, `local-ssd`, and `local-hdd` StorageClasses. The data stays on the server through the reinstall of each bare-metal host during the roll. While the driver switches over, mounted volumes keep working. New local volumes wait about a minute, then provision normally. ## Prepare for the other changes ### Services with a traffic distribution setting Cilium service topology is now enabled and honors `spec.trafficDistribution` and the `service.kubernetes.io/topology-mode` annotation on Services. Any Service that already sets either field routes differently after the upgrade. Before you upgrade, find any Services using these settings and decide whether to keep, change, or remove them. The same manifest keeps traffic on the client's node (`PreferSameNode`) or in its zone (`PreferSameZone`, `PreferClose`, `topology-mode: Auto`), and falls back to all endpoints only when there is none there. To find the Services that set one, run this against the workload cluster: ```console $ kubectl get services -A \ -o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,TRAFFIC-DISTRIBUTION:.spec.trafficDistribution,TOPOLOGY-MODE:.metadata.annotations.service\.kubernetes\.io/topology-mode' \ | grep -v ' *' ``` The output lists only the Services that change, including those a Helm chart or an operator created: ```text NAMESPACE NAME TRAFFIC-DISTRIBUTION TOPOLOGY-MODE shop cache PreferSameNode shop search PreferSameZone ``` Decide for each Service in the output: - **Keep traffic on the client's node.** Set `PreferSameNode`. After the upgrade, a client uses only the endpoints on its own node, so run an endpoint on every node that has clients. - **Spread traffic over all endpoints.** Remove `trafficDistribution` and the `service.kubernetes.io/topology-mode` annotation from the manifest. - **Zone settings.** Do not set `PreferSameZone`, `PreferClose`, or the `topology-mode` annotation. The zone label is one fixed name per location on cloud nodes and differs between cloud and bare-metal nodes in the same location. See [Why does PreferSameZone treat cloud and bare-metal nodes in one location as different zones?](/support/why-does-prefersamezone-treat-cloud-and-bare-metal-nodes-in-one-location-as-different-zones) See [How does a Service's trafficDistribution work on my cluster?](/support/how-does-a-service-s-trafficdistribution-work-on-my-cluster) for how each setting behaves. ### NodePort of a LoadBalancer Service Once every control plane runs 1.37, the NodePort of an existing `type: LoadBalancer` Service accepts traffic only from its load balancer. Clients that reach the NodePort on a node IP directly are dropped. To keep direct access for a Service, opt it out as described in [Configure a load balancer](/docs/hetzner/apalla/1-37/network/load-balancing/configure-a-load-balancer#limit-the-nodeport-to-the-load-balancer). {/if} ## Not sure which Kubernetes minor and Cluster Stack release your cluster uses? Run this against the Syself Autopilot management cluster, not the workload cluster: ```console $ kubectl get clusters -A ``` The `CLUSTERCLASS` column shows the Cluster Stack release and `VERSION` shows the Kubernetes version. Select that version in the picker at the top of this page. {/if}