What a self-hosted Kubernetes cluster involves
A self-hosted Kubernetes cluster is a control plane and a pool of nodes that you install, secure, back up and upgrade yourself, in infrastructure you control. The install is the smaller part of the work. Kubernetes does not choose a network plugin, storage driver, traffic entry point, registry, identity provider or backup method, and those choices make up most of a self-hosted platform.
Kubernetes is an open source system for managing containerized applications across multiple hosts. The Kubernetes source repository is licensed under Apache-2.0, and the Cloud Native Computing Foundation hosts the project. It schedules containers across nodes, restarts failed workloads and exposes a declarative API for deployments, services, storage claims and configuration.
The control plane components are kube-apiserver, etcd, kube-scheduler, kube-controller-manager and an optional cloud-controller-manager. Each node runs a kubelet, an optional kube-proxy and a container runtime. These names matter later, because version skew rules, backups and hardening checks all refer to them.
Start with the workloads. Stateless services, batch jobs, data stores and GPU jobs place different demands on node pools, storage and scheduling. A shared platform that hosts regulated data needs stricter defaults than a single team's cluster. The sections below cover distribution choice, platform layers, topology, identity, hardening, backups and upgrades in that order.
kubeadm vs RKE2 vs K3s: pick a distribution for its defaults
Each option runs conformant Kubernetes. They differ in hardening defaults, packaged components, air-gap support and upgrade tooling.
| Distribution or topic | What it gives you | Consider it when |
|---|---|---|
| kubeadm | The upstream bootstrap tool. It builds a minimal cluster and leaves add-ons and hardening to you. Each machine needs a compatible Linux host, 2 GB or more of RAM, and a unique hostname, MAC address and product_uuid. Control plane machines need 2 or more CPUs. Client certificates expire after one year by default. | You want close alignment with upstream and will own every add-on and certificate renewal. |
| RKE2 | A Rancher distribution for enterprise use. It embeds containerd and runs control plane components as static pods. Its defaults let clusters pass the CIS Kubernetes Benchmark v1.12 or v1.11 with minimal operator effort. It supports FIPS 140-2 and documents air-gapped installs. | Hardening, regulated environments or disconnected networks are early requirements. |
| K3s | A fully compliant distribution in a binary under 100 MB. It packages containerd, Flannel, CoreDNS, Traefik, ServiceLB, kube-router, local-path-provisioner and Spegel. SQLite is the default datastore, and etcd3, MySQL and Postgres are supported. A server needs 2 cores and 2 GB of RAM; an agent needs 1 core and 512 MB. | Edge sites, small footprints or many small clusters matter most. |
| OKD | An opinionated distribution, closely related to Red Hat OpenShift. Many platform components come preinstalled as Operators, and nodes run an immutable OS that is updated through cluster APIs. | You want an integrated platform and accept its choices for node OS and updates. |
| Air-gapped installs | RKE2 can load images from a private registry, from an images archive copied to /var/lib/rancher/rke2/agent/images/, through Hauler or through its embedded registry mirror. K3s also documents air-gapped installs. | The cluster has no route to the internet and every image must come from inside the network. |
| etcd snapshots | RKE2 takes scheduled etcd snapshots by default at 00:00 and 12:00, keeps 5 per server node and stores them in /var/lib/rancher/rke2/server/db/snapshots. On kubeadm you create snapshots with etcdctl and schedule them yourself. | Backups must run from the first day and you want to know who owns the schedule. |
Decide the platform layers up front
These components decide how workloads communicate, persist data and receive traffic. Changing them later usually means a migration.
Networking (CNI)
Choose a CNI plugin that enforces NetworkPolicy. A pod is non-isolated by default, and NetworkPolicy has no effect unless the network plugin implements it. Plan pod and service CIDRs so they do not overlap with data center ranges or VPNs, since changing them after installation is disruptive. On RKE2, Canal is the default CNI and the only bundled one rebuilt for FIPS.
Storage (CSI)
Map storage classes to backends such as Ceph RBD or a SAN driver. Decide reclaim policy, expansion and snapshot support, then test a node loss with a stateful workload attached. etcd snapshots do not hold persistent volume data, so choose the volume backup method in the same design pass.
Traffic entry
Use Gateway API or a maintained Ingress controller, plus a load balancer implementation on bare metal. The Ingress NGINX project retired in March 2026 with no further releases, bug fixes or security updates, and it recommends Gateway API or another Ingress controller. Clusters still using it should plan a move now.
Registry and supply chain
Run a private registry such as Harbor with vulnerability scanning, and allow pulls only from approved registries. Air-gapped clusters need every image, chart and OS package mirrored before installation day. Plan the same mirroring path for each later upgrade.
Certificates
kubeadm client certificates expire after one year by default, and the default CA lasts 10 years. Run kubeadm certs check-expiration to see expiry dates. Control plane upgrades renew all certificates unless you pass --certificate-renewal=false. After a manual kubeadm certs renew, restart the control plane Pods, because not every component reloads certificates dynamically.
Size the control plane and node pools for high availability
Run three control plane nodes behind a load balancer or virtual IP. The default stacked topology runs a local etcd member on each control plane node and needs at least three of them. External etcd needs three control plane hosts plus three separate etcd hosts, twice as many as stacked. The etcd documentation recommends an odd number of members and a five-member cluster for production. etcd is sensitive to disk write latency, so give it fast local storage. K3s embedded etcd HA needs TCP ports 2379 and 2380 open between servers, and 6443 is the API server port.
Size nodes from resource requests, pod density, failure headroom and daemon overhead. Separate pools by workload class, such as general services, data stores or GPU jobs, using taints, labels and quotas. Keep enough spare capacity to drain a node for maintenance. In-place minor-version kubelet upgrades are not supported, so every worker must be drained before it is upgraded. K3s agents need only 1 core and 512 MB, which suits small edge nodes, while data store pools usually need far more memory and faster disks.
A disconnected cluster needs a local registry, mirrored charts, an internal OS package source, internal time and DNS, and a controlled path for updates. Mirror every image, chart and OS package before installation day. RKE2 documents several routes: a private registry, an images archive in /var/lib/rancher/rke2/agent/images/, Hauler or the embedded registry mirror. K3s documents air-gapped installs too. Decide who carries each new patch release across the boundary, because upgrades need the same mirroring as the first install.
Bare metal removes a layer and can suit GPU or storage-heavy workloads, but hardware failure becomes part of the cluster runbook. For a kubeadm install, each machine needs a compatible Linux host, 2 GB or more of RAM, full network connectivity and a unique hostname, MAC address and product_uuid. Control plane machines need 2 or more CPUs. By default the kubelet fails to start if swap is detected, unless failSwapOn is set to false. Virtual machines on Proxmox VE or OpenStack make node replacement easier, so decide who handles hardware repair first.
Connect kubectl and the API to your identity provider with OIDC
Kubernetes has no API objects for normal user accounts. An external system manages them, while the Kubernetes API manages service accounts. People authenticate through client certificates, OpenID Connect tokens or another configured method, and RBAC decides what they can do. The practical setup is usually OIDC: the API server trusts an issuer such as Keycloak or Microsoft Entra ID, and users sign in through a kubectl credential plugin.
For OIDC, the API server authenticates with the id_token. That token cannot be revoked, so it should be short-lived, and kubectl uses the refresh_token to obtain new ones. Structured authentication configuration (--authentication-config) has been stable since v1.34. It allows up to 64 JWT authenticators and cannot be combined with any --oidc-* flag. Exec credential plugins return a bearer token or a client certificate to kubectl, which is the route for other login protocols.
Anonymous requests are treated as system:anonymous in the group system:unauthenticated. Since v1.34, the AuthenticationConfiguration file can limit anonymous access to paths such as /livez, /readyz and /healthz. Set that limit instead of leaving the default open.
Map identity provider groups to Roles and ClusterRoles through bindings kept in Git, and reserve cluster-admin for a small group. Keep an offline break-glass credential for identity provider outages and test it on a schedule. Automation should use service accounts with short-lived tokens. DeployOpen connects OIDC sign-in as part of the cluster build and documents the RBAC model at handover.
Harden against the CIS Kubernetes Benchmark
Use the CIS Kubernetes Benchmark as the baseline, record each deviation with a reason, and rerun the checks after every upgrade.
| Area | Control | How to check |
|---|---|---|
| API server | Limit anonymous access to health endpoints, enable audit logging and restrict network reach to the API. On RKE2, audit logging stays off until you change /etc/rancher/rke2/audit-policy.yaml from level None and restart rke2-server. | An unauthenticated request to a resource is rejected, and audit events appear in /var/lib/rancher/rke2/server/logs/audit.log and in central logs. |
| RKE2 profile | Set profile to cis in /etc/rancher/rke2/config.yaml. This enables RKE2 hardening, including restricted Pod Security Admission everywhere except kube-system, compliance-operator-system and tigera-operator. | The benchmark run passes, and each remaining exception has a written reason. |
| Workloads | Apply Pod Security Admission per namespace at the baseline or restricted level, in enforce, audit and warn modes through pod-security.kubernetes.io labels. Do not exempt controller service accounts such as replicaset-controller. | A privileged test pod is refused in a restricted namespace. |
| Network | Apply a default-deny NetworkPolicy per namespace, then allow documented flows. This works only if the CNI plugin implements NetworkPolicy. | A pod cannot reach another namespace's database without a policy. |
| Secrets at rest | Secrets are not encrypted at rest by default. Run kube-apiserver with --encryption-provider-config pointing to an EncryptionConfiguration file. The first provider encrypts new writes, so identity must not be listed first. | Secret values in an etcd snapshot are not readable in plain text. |
| etcd access | Access to etcd is equivalent to root permission in the cluster. Use TLS certificates for etcd peer and client traffic, and encrypt snapshot files. | Only API servers and backup jobs can reach etcd, and every connection uses TLS. |
| Nodes | Harden the host OS, keep kubelet authentication and authorization on, and patch on a schedule. | Benchmark results are stored with the change record. |
Back up etcd and upgrade one minor version at a time
etcd holds the cluster state, including RBAC and Secrets. The Kubernetes etcd documentation says to encrypt snapshot files because a snapshot contains all Kubernetes state, and it shows how to create one with etcdctl snapshot save. Take scheduled snapshots and copy them off the cluster. A restore means stopping all API server instances, restoring state in every etcd member with etcdutl snapshot restore and restarting the API servers, so rehearse it. Snapshots do not contain persistent volume data. Back up stateful workloads with a tool such as Velero or application-native backups, and keep manifests in Git.
Kubernetes releases about three times a year. Each release branch is maintained for about 12 months with patch releases, and the project maintains the three most recent minor releases. As of 2026-12-04, the releases page lists 1.37.3, 1.36.7 and 1.35.11 as the latest patches, all dated 2026-11-25. End of life dates are 2027-10-28 for 1.37, 2027-06-28 for 1.36 and 2027-02-28 for 1.35. Version 1.38 is in early planning. Distributions follow on their own schedules.
The version skew policy sets the order. Upgrade kube-apiserver first, then kube-controller-manager, kube-scheduler and cloud-controller-manager, then kubelet and kube-proxy. Minor versions must not be skipped, even in single-instance clusters. A kubelet must not be newer than kube-apiserver and may be up to three minor versions older. In an HA cluster, the newest and oldest kube-apiserver instances must be within one minor version of each other.
The kubeadm upgrade guide supports 1.36.x to 1.37.x or 1.37.x to a later 1.37.y. It advises backing up important state, upgrading the primary control plane node first, then the other control plane nodes, then the workers, using the pkgs.k8s.io repositories. If an upgrade includes an etcd upgrade, in-flight API requests stall while the etcd static pod restarts. Before each step, check charts for removed APIs, confirm add-on compatibility and take a fresh etcd snapshot.
Who owns what in a shared Kubernetes cluster
A shared cluster has several owners. Write them down before the first production workload arrives, and record the owner of every exception.
Platform team
- Runs the control plane, node pools and add-ons.
- Owns etcd backups, restore tests and certificate renewal.
- Plans and executes minor version upgrades in order, one version at a time.
Application teams
- Own manifests, charts, resource requests and probes.
- Respond to alerts for their workloads.
- Back up data in their persistent volumes.
Security
- Approves RBAC roles, Pod Security levels and registry policy.
- Reviews benchmark results and exceptions.
- Holds the break-glass procedure and audit logs.
Change record
- Versions of the cluster, add-ons and node images.
- Upgrade runbook with the last tested restore date.
- Hardening exceptions with an owner and review date.
Kubernetes deployment questions
kubeadm vs RKE2 vs K3s: which should we choose?
Choose kubeadm for close upstream alignment when you will own add-ons, hardening and certificate renewal. Choose RKE2 when hardening, regulated environments or disconnected networks are early requirements, because its defaults target the CIS Kubernetes Benchmark. Choose K3s for edge sites, small footprints or many small clusters. OKD suits teams that want an integrated platform and accept its node OS and update model. The workload mix usually settles the choice.
How do we install Kubernetes on bare metal?
Pick a distribution, confirm each host meets its requirements, then plan CIDRs, storage, a load balancer implementation and the control plane topology before the first node joins. With kubeadm, hosts need unique hostnames, MAC addresses and product_uuid values, and swap must be off or explicitly allowed. Bare metal makes hardware failure part of the runbook. Virtual machines on Proxmox VE or OpenStack make node replacement easier.
What does a Kubernetes high availability control plane need?
Three control plane nodes behind a load balancer or virtual IP. With stacked etcd, each control plane node runs a member. External etcd needs three more hosts dedicated to etcd. Use an odd number of etcd members, with five recommended for production in the etcd documentation, and give etcd fast local storage. During upgrades, the newest and oldest kube-apiserver instances must stay within one minor version of each other.
How do we back up and restore etcd?
Take scheduled snapshots with etcdctl snapshot save, encrypt the files because a snapshot holds all cluster state, and copy them off the cluster. To restore, stop all API server instances, restore every etcd member with etcdutl snapshot restore, then restart the API servers. Snapshots exclude persistent volume data, so back up stateful workloads separately. Rehearse the restore and record the date in the change record.
How do we upgrade a minor version with kubeadm?
Upgrade one minor version at a time, since skipping is unsupported. Back up etcd, upgrade the primary control plane node, then the other control plane nodes, then drain and upgrade workers. Check charts for removed APIs and add-on compatibility first. If the upgrade includes etcd, in-flight API requests stall while its static pod restarts. Falling behind means several sequential upgrades, and unmaintained versions receive no security patches.
What does the Kubernetes version skew policy allow?
The kubelet must not be newer than kube-apiserver and may be up to three minor versions older, or two for kubelet versions below 1.25. kube-controller-manager, kube-scheduler and cloud-controller-manager must not be newer than the API server and may be one minor version older. kubectl may be one minor version older or newer. Upgrade the API server first and never skip a minor version.
What replaces Ingress NGINX, and how do we plan the move?
The Ingress NGINX project retired in March 2026 with no further releases, bug fixes or security updates. It recommends moving to Gateway API or another maintained Ingress controller. List every Ingress resource that depends on it, choose the replacement, and add a load balancer implementation if the cluster runs on bare metal. K3s packages Traefik and ServiceLB, which some small clusters may use.
Do you certify the cluster as compliant?
No. DeployOpen hardens clusters, collects evidence and helps teams prepare for SOC 2, ISO 27001, DORA or NIS2 assessments. Audit reports and certifications come from your auditor or certification body.
Scope and handover
Effort depends on the distribution, the number of clusters, air-gap requirements, storage backends, identity integration, workload migration and the hardening baseline. Add-ons and the upgrade process often take more time than the initial install.
DeployOpen plans, deploys and hardens the cluster, connects OIDC sign-in, sets up backups, runs upgrades and documents the result. For workload migration, start with a stateless service that already runs in a container, define it in Git and run it alongside the current host. Move stateful systems after storage, backup and restore have been tested with that workload.
Handover includes the cluster inventory, add-on versions, RBAC model, benchmark exceptions, restore evidence, the upgrade runbook and a support route.
DeployOpen does not issue compliance certifications. The evidence it collects supports your own assessment, and your auditor or certification body issues the report.
Sources and further reading
- Kubernetes releases ↗
- Kubernetes version skew policy ↗
- Operating etcd clusters for Kubernetes ↗
- Ingress NGINX retirement announcement ↗
- Kubernetes GitHub ↗
- Kubernetes components ↗
- Kubernetes release cycle ↗
- kubeadm upgrade ↗
- Install kubeadm ↗
- kubeadm HA topology ↗
- kubeadm certificate management ↗
- Kubernetes authentication ↗
- Pod Security Admission ↗
- Encrypt data at rest ↗
- Network Policies ↗

