Installing RKE2 for a hardened Kubernetes cluster

A practical plan for installing RKE2 when security defaults matter, covering roles, CIS and FIPS choices, air-gapped delivery, bundled networking and standalone versus Rancher-provisioned clusters.

On this page

Installing RKE2 for a hardened Kubernetes cluster: when it fits and what it decides

RKE2 is Rancher's hardened, upstream-conformant Kubernetes distribution for teams whose security requirements shape the cluster from the first node. Security-led and regulated teams choose it when they want the control plane, node components and bundled add-ons delivered with security-oriented defaults, and they want to run it in infrastructure they control rather than in a managed service. The alternatives are not wrong for every case: kubeadm gives the most manual control, K3s suits small or edge footprints, and Talos suits teams that want immutable nodes with no shell access. RKE2 sits between hands-on assembly and a lightly configured default install, which is why the decisions below matter so much.

Several installation choices are fixed before the first node boots, and changing them later usually means rebuilding nodes or the cluster. These include the server and agent role layout, the CIS profile the server runs under, whether you need a FIPS-validated build, whether nodes pull from a public source or a private registry or tarball set for an air-gapped network, which CNI and ingress components are bundled or disabled, and whether the cluster is standalone or provisioned and managed by Rancher. Each choice also affects what your auditors and security reviewers will ask for. Confirm the exact RKE2 release, its supported Kubernetes minor version and the FIPS and CIS variants you need against the current RKE2 documentation, because Kubernetes itself ships roughly three minor releases a year, and the project supports only the three most recent minor versions at any time.

Work through these decisions in order and record each one in a design document before ordering hardware or opening change tickets. Start with the management model, because Rancher-provisioned clusters and standalone clusters differ in how configuration, upgrades and credentials are handled. Then fix the registry source and image mirror path, since an air-gapped build changes every later step. Finally, set the CNI and ingress choices and the node topology, because they determine network policy enforcement and how the control plane is load balanced. Ask your vendor or internal platform team to confirm which of these choices change the support boundary, and which need your security team's sign-off.

Which RKE2 options fit which environment

RKE2 separates nodes into server nodes, which run the control plane and embedded etcd, and agent nodes, which run only workloads. The split decides how many machines carry cluster state, how much capacity is left for applications and how a failed node is replaced. Control plane availability depends on keeping a quorum of server nodes, and etcd needs an odd number of members, so the server count is a decision made early rather than a sizing detail to revisit later.

  • Server count: Plan an odd number of servers, typically three for high availability, and confirm the supported topology in the RKE2 documentation.
  • Agent capacity: Agents carry application load, so their count and size follow workload needs, not control plane needs.
  • Registration address: Agents join through a stable address in front of the servers, which must be decided before the first join.
  • Taints and placement: Keep application pods off server nodes unless the design requires it.
  • Node replacement: Confirm how a server is removed and rejoined without losing etcd quorum.

Before committing, check the RKE2 server and agent configuration reference for the exact join token, tls-san and etcd options for your release.

RKE2 configuration options and when each fits

This table lists the configuration choices a team must make before installing RKE2 for a hardened cluster, what each one controls, when it fits and what to confirm. Read each row as a decision to settle with your security and platform owners, then check exact config keys and flags against the RKE2 documentation for the version you plan to run.

OptionWhat it controlsWhen it fitsWhat to confirm
Server and agent rolesWhether a node runs the control plane and etcd (server) or only workloads (agent)Three or more servers for a highly available control plane, with agents added for capacityServer count and placement across failure domains, and that agents never hold control plane roles
CIS profile settingWhether RKE2 applies the CIS-aligned kernel, host and cluster settings it ships withClusters where an assessor will expect CIS Kubernetes Benchmark evidenceWhich CIS benchmark version matches your RKE2 release, and which checks your team must still fix by hand
FIPS-validated buildWhether you run the FIPS-enabled RKE2 build with approved cryptographic modulesWorkloads under federal or contractual FIPS requirementsWhether your RKE2 version offers this build, and whether your applications and images work with it
Air-gapped installation from a private registryWhere system images and binaries are pulled from during install and upgradesNetworks with no route to public registries, or where image provenance must be controlledMirror completeness for every bundled image, your registry trust chain, and the process for syncing new releases
Air-gapped installation from tarballsWhether install artifacts are loaded from local archives instead of a registrySmall or isolated environments with few nodes and manual transfer proceduresHow archives are verified and transferred, and how the upgrade bundle is kept in step with the cluster version
Bundled CNI choiceWhich network plugin RKE2 installs for pod networking and network policyTeams that want the default plugin supported with RKE2 and do not need a custom data pathWhether your network policy needs, encryption and observability requirements are met by the bundled plugin or need a replacement
Bundled ingress choiceWhether the ingress controller RKE2 ships is enabled, replaced or disabledClusters that standardize on one ingress or Gateway API implementation from the startIngress controller ownership, TLS certificate handling and whether the bundled component meets your supported-version rules
Standalone or Rancher-provisionedWhether each cluster is managed by its own configuration or by a central Rancher management planeSingle clusters or a small fleet managed by one platform team with clear change controlWho holds administrative credentials, how upgrades are scheduled across clusters, and whether the central management plane is itself hardened and backed up

How server nodes, agents and the registration address fit together

The install starts by choosing a source, either public downloads or a private registry loaded from tarballs or a mirror. Server nodes form the control plane and must be provisioned first, then agent nodes join through one fixed registration address that load-balances to the servers. Before workloads run, apply the CIS profile and verify the node and cluster state, since the registration address and server count are hard to change later. Trust boundaries separate the private registry, the control plane and workload nodes.

Install flow from source selection through server and agent roles to operations.

How to install RKE2 in a hardened, offline-capable way

This sequence takes a cluster from node readiness to a verified RKE2 control plane and agents, with the hardening profile, image sources and CNI choices fixed before the first server starts. Each step ends with a check, so the team knows the configuration is correct and reproducible before the cluster takes workloads.

  1. Confirm node and OS prerequisites

    The platform engineer checks every planned server and agent against the RKE2 support matrix for the chosen release, covering OS version, kernel settings, cgroup mode, time sync, firewall rules between nodes, and disk and memory sizing for etcd on server nodes. Confirm the fixed registration address and the certificate subject names users will use. Done means a written checklist with each node marked as passing, and a command output such as uname -r, timedatectl status and systemctl is-active firewalld (or your firewall service) captured for each host.

  2. Stage artifacts for offline installs

    For air-gapped sites, the platform team downloads the RKE2 binary tarball, the system images archive, and the install script for the exact release, then copies them through your approved transfer path. If you use a private registry, mirror the required system images and configure registries.yaml on every node. Verify checksums against the values published with the release before anything is installed. Done means every artifact has a recorded hash that matches the release, and a test pull from the private registry succeeds from a node with no internet route.

  3. Write the first server configuration

    The engineer writes /etc/rancher/rke2/config.yaml on the first server before installation. Set the hardening profile, the CNI plugin, the cluster token, tls-san entries for the fixed registration address and any load balancer names, and the cluster CIDR choices if the defaults conflict with your network. Keep secrets such as the token out of shared chat and load them from your secrets store. Done means the file exists with the intended keys, and a peer review confirms each value matches the design record.

  4. Install the first server with the profile

    On the first server, the engineer runs the RKE2 install script in server mode, pointing it at the local tarballs with the artifact path variables when the site is offline, then starts the rke2-server service. The CIS profile needs host-level settings, such as the kernel parameters and the etcd user and directory ownership that the RKE2 hardening guide lists, to be in place before start. Done means the service reports active, the kubeconfig at /etc/rancher/rke2/rke2.yaml is present, and the control plane pods reach Running in the kube-system namespace.

  5. Join remaining servers and agents

    The engineer adds the other server nodes first, using the same token, the same profile and the fixed registration address, so the control plane keeps an odd number of etcd members. Agent nodes join afterward with the agent role and the same registration settings. Join nodes one at a time and wait for each to settle. Done means every server and agent appears in the node list with Ready status, and the etcd member list shows the expected number of members with a healthy state.

  6. Validate cluster and node health

    Run cluster checks from an admin workstation: confirm nodes are Ready, that core system pods are running, that DNS resolves inside a test pod, and that a test workload pulls its image from the private registry without any external route. Then run the CIS benchmark scan with your chosen tool and record the results, reviewing each failed check to decide whether it is a deliberate exception. Done means a dated validation record with command output, the scan report, and a list of accepted exceptions signed off by the security owner.

  7. Record configuration in version control

    Commit the final config.yaml files (with secrets replaced by references), registry mirror settings, the install script version, the artifact hashes, the node inventory and the validation report to a version-controlled repository. Tag the commit with the cluster name and release. Include the steps needed to rebuild a node and the upgrade order you intend to follow. Done means a second engineer can read the repository and rebuild one server from it, and the tag matches the running cluster.

Security controls to set at install time

Most hardening gaps in a new RKE2 cluster come from defaults that were accepted without review during installation. The six controls below cover the decisions that are hard to change later: the benchmark profile, how secrets and snapshots are protected, how users and workloads are admitted, and who can change what.

CIS profile alignment

RKE2 ships with a CIS profile option that adjusts host and cluster settings to match the CIS Kubernetes Benchmark. Choose the profile at install time and record which benchmark version it targets. Treat the mapping as something to confirm, not assume: check the current benchmark version against your RKE2 release, then run a scan after installation and document every deviation you accept, with a reason.

CIS Kubernetes Benchmark

Secrets encryption at rest

Kubernetes stores Secrets unencrypted in etcd unless encryption at rest is configured. Decide before the first workload is deployed whether Secrets will be encrypted with a key you manage, and confirm how RKE2 exposes that setting in its configuration. Enabling encryption later does not re-encrypt existing objects, so rewrite Secrets after the change and verify the result.

Secrets good practices

Pod Security Standards defaults

Pod Security Standards define Privileged, Baseline and Restricted levels, and Pod Security Admission enforces them per namespace. Set cluster-wide defaults so that new namespaces start at a restrictive level, and grant exceptions only to namespaces that need them, such as node-level system components. Test each level with dry-run warnings before enforcing it on existing namespaces.

Pod Security Standards

Authentication sources

Kubernetes does not store user accounts. Decide which source authenticates people: X.509 client certificates for break-glass and automation, OpenID Connect for workforce sign-in through your identity provider, or webhook token authentication for a central service. Plan how certificates are issued and revoked, and confirm that the OIDC issuer, client ID and group claims are set correctly before granting cluster-admin rights.

Kubernetes authentication

Least-privilege RBAC

Bind roles to groups from your identity provider rather than to individual users, and keep cluster-admin limited to a small named set of operators. Review default service account permissions and remove token auto-mounting where workloads do not call the API. Restrict list and watch on Secrets, because those verbs expose secret values even when individual reads are controlled.

Protecting etcd snapshots

RKE2 takes etcd snapshots on a schedule, and those snapshots contain the Secrets stored in the cluster. Decide where snapshots are written, who can read them, and whether they are encrypted before they leave the node. Store copies outside the cluster and test restores with the etcd tooling on a separate system, so that a backup is never the only copy of sensitive data.

Operating etcd clusters

Why etcd backups and the upgrade plan belong in the install scope

RKE2 server nodes run the control plane and etcd together, so the decisions that protect cluster state have to be made when you install, not after the first incident. Plan an odd number of server nodes so etcd can keep quorum when one member fails, and confirm with your own sizing exercise whether five members fits your availability target, since the Kubernetes documentation recommends five members for production etcd clusters. Record the node count, the server join token handling and the snapshot location in the install runbook before the first server starts.

Snapshot tooling is the second install-time decision. The Kubernetes etcd guidance uses etcdctl snapshot save for backups and etcdutl for restores, and an RKE2 cluster needs a backup schedule, a retention policy and an off-node copy of those snapshots. Confirm with RKE2's own documentation which snapshot and restore commands its distribution exposes and where it writes them by default. Then run a restore into a scratch environment once the cluster is up. A backup that has never been restored is an untested assumption, and that test is far cheaper to schedule now than during an outage.

The upgrade plan is tied to the backup plan because every minor version change moves the control plane. The Kubernetes version skew policy requires the kube-apiserver to be upgraded one minor version at a time, before the controller manager, scheduler and kubelets, and it allows kubelets to be up to three minor versions older than the API server. Agree on that sequence, the maintenance window and a fresh snapshot before each upgrade, and decide who approves a rollback. Check the current support window for the minor version you choose on the Kubernetes release pages, because patch support ends on dates you will need to plan around.

Limits to confirm in your environment

RKE2 defaults are strong, but several hardening claims depend on the exact release, operating system and hardware you run. The cards below list what to verify with the vendor and in your own test environment before a hardened cluster goes into production.

FIPS build availability

Confirm the FIPS build exists for your exact RKE2 version and operating system before planning around it. FIPS-validated cryptography is not a property you can assume from the minor version alone. Ask the vendor which release lines, OS versions and architectures ship a FIPS build, then check that your required components, including the CNI and ingress you select, run in that mode. Record the answer in your change request.

CIS profile results on your nodes

A profile name does not prove a node passes it. Run the CIS scan against your own nodes after installation, using the profile that matches your Kubernetes version, and review every failed check. Some findings depend on host settings such as kernel parameters, file permissions and the OS image, which the RKE2 install does not control. Keep the scan output as baseline evidence for your compliance team.

CIS Kubernetes Benchmark

Air-gap artifact completeness

An air-gapped install fails quietly when a single image, binary or checksum file is missing from the transfer. Build an inventory of every image and tarball the chosen release needs, including system components and any add-ons you enable, and mirror it into your private registry. Test a full install on a network with no outbound access before the production window. Confirm the list with the vendor for your release, since it changes between versions.

Supported OS and hardware

Confirm that your operating system version, kernel, architecture and hardware sizing appear on the vendor's support matrix for your RKE2 release. SELinux mode, cgroup configuration and filesystem layout can each block a hardened install if they differ from what the vendor tested. Ask for the supported list in writing, and reproduce your node build in a lab to catch conflicts with corporate baselines, endpoint agents or disk encryption.

Bundled CNI and ingress fit

RKE2 bundles a CNI and an ingress controller, and their defaults may conflict with your existing network policy engine, firewall rules or traffic inspection tools. Map the ports, encapsulation mode and policy behavior the bundled components use against your network team's standards. Decide whether to keep, replace or disable each bundled component before the first server starts, because changing it later affects running workloads.

Rancher version compatibility

If you plan to manage RKE2 clusters centrally, confirm that your Rancher version supports the RKE2 release you intend to run, and check which clusters Rancher can import or provision. Compatibility can differ between provisioning and imported clusters, and an unsupported pairing can block upgrades. Test the upgrade path in a staging environment with the same Rancher and RKE2 versions before you standardize on either.

Questions buyers ask before installing RKE2

What drives the cost of an RKE2 installation?

Cost follows the scope you agree in writing, and the main drivers are the number of clusters, the number of server and agent nodes, whether the environment is air-gapped, and how much hardening evidence you need. Ask for the quote to split one-time work from recurring work. One-time work usually covers design, installation, hardening, identity and registry setup and handover. Recurring work covers upgrades, patch cycles and support if you retain DeployOpen after go-live. Ask the quote to name each deliverable, the environments in scope and the responsibilities of your team versus DeployOpen. DeployOpen does not publish a price list, so the written scope is the basis for any figure.

Can our own team install RKE2 without outside help?

Yes, many platform teams install RKE2 themselves, because the project documents its install steps and configuration keys. The harder parts are the decisions around them: server and agent layout, the CIS profile and its exceptions, FIPS build selection, the private registry and tarball process for air-gapped sites, CNI and ingress choices, and how the cluster joins Rancher if you use it. Check whether your team has time to test each decision, keep a configuration record, and run the first upgrade. If those skills or hours are missing, a partner can cover the gap, but the work still needs your engineers during design and handover.

How long does an RKE2 installation take, and what sets the duration?

Duration depends on how many decisions are still open when the work starts and how much testing your environment requires. The main factors are the number of clusters, the availability of hardware or virtual machines, whether the site has internet access, how quickly your security team reviews the CIS profile results, and the change windows your operations team allows. Ask for a timeline in the written scope with named milestones, and ask which dates depend on your teams. Waiting on registry access, firewall rules or security sign-off is the most common cause of delay, so confirm those owners before work begins.

What does the work need from our team?

The work needs a small set of inputs and access before the first node is built. Confirm the following with your team:

  • Access to the target hosts or hypervisor, with a named administrator for each environment
  • Change windows for node builds, cluster joins and any restarts
  • Network details: subnets, DNS names, load balancer address for the server API, and firewall rules between nodes
  • For air-gapped sites, the private registry location, credentials, and how tarballs or images will be transferred
  • Identity and certificate sources, plus a named approver for security baseline exceptions
  • A decision on the Kubernetes version and upgrade window

Ask the scope to list who provides each item and the date it is due.

Should we run RKE2 standalone or provision it through Rancher?

Choose standalone RKE2 when you want each cluster managed directly from its own configuration and you do not need a central management plane. Choose Rancher-provisioned clusters when you run many clusters and want one place for lifecycle, access and policy. Standalone clusters have fewer moving parts but require your team to manage upgrades and access per cluster. Rancher adds another system to secure, back up and upgrade, and it changes how identity and RBAC are configured. Decide this before the build, because switching later affects node configuration and operations. Ask the scope to record which option was chosen and why.

Which security decisions should we sign off before installation?

Sign off on the CIS benchmark profile and any exceptions, the FIPS build decision, how Secrets are encrypted at rest in etcd, the authentication method for human users, the Pod Security Standards level for each namespace, and the CNI and ingress components. Kubernetes stores Secrets unencrypted in etcd by default, so encryption at rest should appear in your sign-off list. Your compliance team should also confirm which evidence they need, such as configuration records and audit logs. DeployOpen prepares systems, controls and evidence for compliance assessments, but independent auditors and certification bodies issue any audit report or certification.

What should we check in a written scope for RKE2?

Check that the scope names the RKE2 version, each environment, the number of server and agent nodes, the CIS profile and documented exceptions, the registry or tarball method, the identity integration, the backup approach for etcd, and the acceptance tests. Also confirm what is excluded, such as application workloads, Rancher, storage or monitoring, and who owns those. Ask how changes to scope are priced and approved. Finally, check the handover items: runbooks, configuration files, access records and the upgrade plan. A scope that lists these items gives you a basis for comparing quotes and for judging completion.

What DeployOpen scopes, installs and hands over for an RKE2 cluster

DeployOpen works on RKE2 installs inside the client's own infrastructure, whether that is their cloud accounts, data center or an air-gapped network. Every engagement starts with a fixed scope agreed in writing that names the server and agent nodes, the operating system and runtime baseline, the CIS profile target, the FIPS decision, the install method (online, private registry or tarballs), the bundled CNI and ingress choices, and whether the cluster is standalone or provisioned from Rancher. Deliverables and timelines follow from that document, and a quote follows from the written scope. Confirm with your own team which Kubernetes minor version your application vendors support before the scope is fixed, because the version determines the upgrade window that follows.

The design phase settles the decisions that are hard to change after installation. The team agrees how many server nodes run the control plane and embedded etcd, which must be an odd count, and how the registration address is fixed. It also sets the Pod Security Admission defaults, the Secrets encryption at rest configuration, the audit policy, the OIDC settings that connect the API server to your identity provider, and the air-gap image source. Each choice is recorded with its reason so that a later reviewer can trace why a control exists. Installation is then carried out with the agreed configuration files, and verification covers node readiness, the profile's control checks, a test of encrypted Secrets, and a restore rehearsal of an etcd snapshot.

The handover package contains the configuration as code, the installation and verification records, the node and certificate inventory, and the runbook for upgrades and etcd backups. These artifacts give your compliance and security teams evidence to review, but DeployOpen prepares that evidence and does not issue audit reports, attestations or certifications, which remain the responsibility of independent auditors. Ongoing upgrades, scheduled re-testing and continuous testing of the cluster can be placed under an optional retainer, so that the minor-version cadence, which the Kubernetes project documents as roughly three releases per year, is handled on a known plan rather than ad hoc.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.