Referencerke2spray

Core configuration reference

Ownership of RKE2 releases, networking, endpoints, datastores, registries, and raw configuration.

Updated Verified SourceEdit this page

Core summary

  • kube_version resolves to a compatible checksum-locked rke2_version.
  • The container runtime is fixed to the containerd bundled with RKE2.
  • Canal, Calico, Cilium, and Flannel are supported as bundled CNIs.
  • Multi-server environments require an external load balancer or Kube-VIP endpoint.
  • Preflight rejects raw RKE2 configuration that overrides Role-owned keys.

Map Kubespray inputs to RKE2 results

PurposePublic inputRKE2 result
Kubernetes versionkube_versionSelect a compatible checksum-locked RKE2 release
RKE2 revisionrke2_versionPin an RKE2 build for the same Kubernetes patch
Runtimecontainer_managerAllow only containerd
CNIkube_network_pluginGenerate RKE2 cni configuration
Pod and Service CIDRsKubespray network variablesGenerate cluster-cidr and service-cidr
API endpointrke2_endpointSelect direct, external, or Kube-VIP mode
Datastoreetcd groupSelect embedded etcd or an external datastore
RegistryKubespray containerd variablesGenerate RKE2 registries.yaml
Ingressrke2_ingress_controllerSelect or disable packaged ingress

Check CNI support

ValueStatus
canalBundled and supported
calicoBundled and supported
ciliumBundled and supported
flannelBundled and supported
kube_network_plugin_multus: trueSupported alongside a primary CNI
none, custom_cni, other external CNIsRejected by the current adapter gap
  • Use only Calico or Flannel when Windows agents are present.
  • Do not change CNI, Multus, Pod CIDR, or Service CIDR after installation.

Choose endpoint and datastore topology

ConditionConfiguration
Single serverrke2_endpoint.mode: direct
Multiple servers with an existing load balancerrke2_endpoint.mode: external
Multiple servers with a managed VIPrke2_endpoint.mode: kube_vip
Embedded etcdMake the etcd group match the control plane
External etcdDefine separate etcd hosts

Avoid raw-config ownership conflicts

  • Extension inputs are limited to rke2_cluster_config, rke2_server_config, rke2_agent_config, and rke2_host_config.
  • Roles own tokens, node identity, endpoint, CIDRs, CNI, and datastore keys.
  • Prefer public Kubespray variables when they can express the desired value.

Conclusion

  • Choose releases from docs/support-matrix.md in the source repository.
  • Review Compatibility and preflight output before applying configuration.