Skip to content

feat: Add RKE2 as alternative Kubernetes distribution for service cluster#4566

Open
j0hnL wants to merge 1 commit into
pub/q2_devfrom
feature/rke2-service-cluster
Open

feat: Add RKE2 as alternative Kubernetes distribution for service cluster#4566
j0hnL wants to merge 1 commit into
pub/q2_devfrom
feature/rke2-service-cluster

Conversation

@j0hnL
Copy link
Copy Markdown
Collaborator

@j0hnL j0hnL commented May 26, 2026

Summary

Add support for deploying RKE2 (Rancher Kubernetes Engine 2) as an alternative to vanilla Kubernetes (kubeadm) for the service cluster. Users can choose the distribution via the new k8s_distro field in omnia_config.yml.

How to use

  1. In input/omnia_config.yml, set k8s_distro: "rke2" in the service_k8s_cluster block
  2. In input/software_config.json, replace service_k8s with service_rke2 in the softwares list
  3. Run the pipeline as normal (local_repo.ymlbuild_image_x86_64.ymldiscovery.yml)

Configuration changes

  • Add k8s_distro field to service_k8s_cluster in omnia_config.yml (default: kubeadm)
  • Update omnia_config.json schema to validate k8s_distro enum (kubeadm/rke2)
  • Expand k8s_cni enum to include canal, cilium, flannel (RKE2-supported CNIs)

Pipeline integration

  • discovery.yml: Enable service_k8s tag when service_rke2 is in software_config.json
  • include_software_config.yml: Detect service_rke2 and set service_rke2_support fact
  • validate_software_config_json.yml: Handle service_rke2 arch and version detection
  • common_validation.py: Accept service_rke2 for cluster validation
  • image_package_collector.py: Dynamically select service_rke2.json for image builds
  • k8s_config/main.yml: Branch NFS setup based on k8s_distro
  • configure_cloud_init_group.yml: Select RKE2-specific templates when k8s_distro=rke2

New files

  • 3 RKE2 cloud-init templates (first server, additional server, agent)
  • create_rke2_config_nfs.yml for RKE2-specific NFS directory setup
  • service_rke2.json package definitions for RHEL 10.0 x86_64

Key differences from kubeadm path

  • RKE2 uses built-in containerd (no CRI-O)
  • RKE2 manages CNI lifecycle (calico/canal/cilium/flannel)
  • Token-based cluster join instead of kubeadm certificates
  • kube-vip deployed as RKE2 static pod manifest
  • RKE2 registries.yaml for Pulp mirror integration
  • Port 9345 for RKE2 supervisor API

Backward compatibility

Existing kubeadm deployment is completely unaffected when k8s_distro=kubeadm (the default). All branching logic only activates for rke2.

@j0hnL j0hnL force-pushed the feature/rke2-service-cluster branch 3 times, most recently from f513dc2 to 11db64e Compare May 26, 2026 19:22
@j0hnL j0hnL force-pushed the feature/rke2-service-cluster branch 2 times, most recently from 0759230 to b4bff18 Compare May 27, 2026 14:29
@j0hnL j0hnL changed the base branch from main to pub/q2_dev May 27, 2026 14:29
…ster

Add support for deploying RKE2 (Rancher Kubernetes Engine 2) as an alternative
to vanilla Kubernetes (kubeadm) for the service cluster. Users can choose the
distribution via the new k8s_distro field in omnia_config.yml.

Configuration changes:
- Add k8s_distro field to service_k8s_cluster in omnia_config.yml (default: kubeadm)
- Update omnia_config.json schema to validate k8s_distro enum (kubeadm/rke2)
- Expand k8s_cni enum to include canal, cilium (RKE2-supported CNIs)

Pipeline integration:
- discovery.yml: Enable service_k8s tag when service_rke2 is in software_config.json
- include_software_config.yml: Detect service_rke2 and set service_rke2_support fact
- validate_software_config_json.yml: Handle service_rke2 arch and version detection
- common_validation.py: Accept service_rke2 for cluster validation
- image_package_collector.py: Dynamically select service_rke2.json for image builds
- k8s_config/main.yml: Branch NFS setup based on k8s_distro
- configure_cloud_init_group.yml: Select RKE2-specific templates when k8s_distro=rke2

New files:
- 3 RKE2 cloud-init templates (first server, additional server, agent)
- create_rke2_config_nfs.yml for RKE2-specific NFS directory setup
- service_rke2.json package definitions for RHEL 10.0 x86_64

Key differences from kubeadm path:
- RKE2 uses built-in containerd (no CRI-O)
- RKE2 manages CNI lifecycle (calico/canal/cilium/flannel)
- Token-based cluster join instead of kubeadm certificates
- kube-vip deployed as RKE2 static pod manifest
- RKE2 registries.yaml for Pulp mirror integration
- Port 9345 for RKE2 supervisor API

Existing kubeadm deployment is completely unaffected when k8s_distro=kubeadm (default).

Signed-off-by: John Lockman <j.lockman@dell.com>
@j0hnL j0hnL force-pushed the feature/rke2-service-cluster branch from b4bff18 to ea1db21 Compare May 27, 2026 15:03
@sujit-jadhav sujit-jadhav requested a review from snarthan May 27, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants