From “Connection Refused” to “Active”: My Journey Running RKE2 on SLES 15 ARM with an M-Series Mac
Building a Kubernetes home lab on the Apple M4 chip offers incredible performance, but it can be a significant configuration challenge. This week, I successfully set up Rancher Manager on RKE2 using SLES 15 SP4 on VirtualBox 7.
The process was a battle against SSL handshakes, disappearing network interfaces, and restrictive Mac security policies. Below is the ultimate guide to replicating this setup, including the lvh.me “DNS hack” that makes it all possible on a locked-down corporate machine.
The Environment
Hardware & Virtualization Host
-
Host Device: Apple Mac with M4 Processor (Apple Silicon/ARM64).
-
Host OS: macOS (Corporate/Locked-down environment).
-
Virtualization Software: VirtualBox 7.x (Developer Preview/Beta for Apple Silicon).
-
Networking Strategy: * Loopback DNS:
lvh.me(Wildcard DNS pointing to127.0.0.1).-
Port Forwarding: VirtualBox NAT engine (Mac:8443 → VM:443).
- This allowed me to connect to my Rancher Manager from a browser on my Mac.
-
Virtual Machines (Guest OS)
Both VM 1 (Manager) and VM 2 (Worker) share the following base configuration:
-
Operating System: SUSE Linux Enterprise Server (SLES) 15 SP4.
-
Kernel Architecture:
aarch64(ARM 64-bit). -
Network Manager:
wicked(Manualifcfg-eth1configuration). -
IP Scheme (Host-Only):
-
Manager (VM 1):
192.168.56.x -
Worker (VM 2):
192.168.56.x(Configured viaifcfg-eth1).
-
Kubernetes & Rancher Prime Stack
The environment is running the latest stable releases of the Rancher “Primordial” stack:
| Component | Version | Role |
| Rancher Server | v2.13.1 | Management UI & API |
| RKE2 (Server) | v1.28+ | Kubernetes Distribution (Server) |
| Rancher Agent | v2.13.1 | Node Registration & Management |
| Helm | v3.x | Package Manager for Rancher installation |
| CAPI (Provisioning) | 108.0.0+up0.9.0 | Cluster API for lifecycle management |
| Rancher Turtles | 108.0.1+up0.25.1 | CAPI Extension for Rancher |
| Webhook | 108.0.1+up0.9.1 | Rancher Admission Webhook |
The Secret Weapon: Why lvh.me?
On a locked-down Mac, you often cannot edit /etc/hosts due to System Integrity Protection (SIP) or corporate MDM. This makes it impossible to map a custom domain like rancher.local to your VM’s IP.
The Solution: lvh.me.
lvh.me is a wildcard DNS service where any subdomain (e.g., rancher.lvh.me) automatically resolves to 127.0.0.1.
-
The Logic: Your Mac browser asks the internet for
rancher.lvh.me. The internet says “That’s at 127.0.0.1 (your own machine).” -
The Bridge: By using VirtualBox Port Forwarding, we “catch” that traffic on your Mac’s localhost and tunnel it into the SLES VM. This bypasses the need for admin rights to modify system networking.
Step-by-Step Instructions: End-to-End Setup
Phase 1: VirtualBox & SLES Settings
For the M4 Mac, standard x86 VM settings will fail. Use these exact specifications:
-
Processor: Assign at least 2 vCPUs.
-
Network Adapter 1 (NAT): Required for internet access to pull RKE2 binaries.
-
Network Adapter 2 (Host-Only): This is your private bridge. Under Advanced, set Promiscuous Mode to Allow All.
-
SLES Tip: During installation, select the “Public Cloud” module to ensure all RKE2 dependencies are available.
Phase 2: SLES Network Stabilization
SLES uses the Wicked manager. You must make your interfaces persistent, or the worker node will lose its connection to the manager.
-
Create/Edit the config:
sudo vi /etc/sysconfig/network/ifcfg-eth1 -
Add:
BOOTPROTO='static',STARTMODE='auto', andIPADDR='192.168.56.3'(for Manager) or.4(for Worker). Your IP value may differ. -
Apply:
sudo wicked ifreload all && sudo wicked ifup eth1.
Phase 3: Install RKE2 & Rancher (VM 1)
-
Install RKE2 Server:
curl -sfL https://get.rke2.io | sudo sh - -
Enable the service:
sudo systemctl enable --now rke2-server -
The Alias Fix: To handle SLES pathing, add
alias kubectl='sudo KUBECONFIG=/etc/rancher/rke2/rke2.yaml /var/lib/rancher/rke2/bin/kubectl'to your.bashrc.
Phase 4: The Locked-Down Mac DNS Hack
Since you can’t edit /etc/hosts, go to VirtualBox > VM 1 Settings > Network > Adapter 1 (NAT) > Port Forwarding:
-
Name: Rancher-UI | Protocol: TCP | Host IP: 127.0.0.1 | Host Port: 8443 | Guest Port: 443
-
Access: Open your browser to
https://rancher.lvh.me:8443.
Phase 5: Join the Worker Node (VM 2)
-
Copy the registration command from the Rancher UI.
-
The SSL Checksum: On VM 1, find the CA hash:
sha256sum /var/lib/rancher/rke2/server/tls/server-ca.crt. -
The Fix: Run the Rancher command on VM 2, but manually ensure the
CATTLE_CA_CHECKSUMenvironment variable is set to the value from Step 2. This prevents the “unknown authority” crash.
Key Takeaways
-
lvh.me is your DNS “Get Out of Jail Free” card for corporate Macs without edit access to /etc/hosts. It’s graciously maintained by Levi Cook.
-
Wicked requires manual
ifcfgfiles in SLES to stay stable. -
M4 Performance is massive; once these network hurdles are cleared, your lab will run faster than most enterprise servers.
SLES 15 Post-Install Automation Script
This script automates the Wicked networking, creates the necessary directories, and sets up a permanent kubectl alias so you can manage the cluster without typing the full path every time.
#!/bin/bash
# — Configuration —
ETH1_IP=”192.168.56.102″ # Change this to your VM 2 IP
KUBECONFIG_PATH=”/etc/rancher/rke2/rke2.yaml”
RKE2_BIN_PATH=”/var/lib/rancher/rke2/bin”
echo “Starting SLES 15 Network & Path Optimization…”
# 1. Configure eth1 (Host-Only Adapter)
sudo tee /etc/sysconfig/network/ifcfg-eth1 > /dev/null <<EOF
BOOTPROTO=’static’
STARTMODE=’auto’
IPADDR=’$ETH1_IP’
NETMASK=’255.255.255.0′
NAME=’VirtualBox Host-Only eth1′
EOF
# 2. Restart Networking
sudo wicked ifreload all && sudo wicked ifup eth1
# 3. Set up persistent Bash Aliases
ALIAS_LINE=”alias kubectl=’sudo KUBECONFIG=$KUBECONFIG_PATH $RKE2_BIN_PATH/kubectl'”
echo “$ALIAS_LINE” >> ~/.bashrc
sudo bash -c “echo ‘$ALIAS_LINE’ >> /root/.bashrc”
echo “Setup Complete! Run ‘source ~/.bashrc’ to begin.”
Related Articles
Nov 25th, 2025
Introduction to Ansible Linux System Roles on SLES 16
Oct 03rd, 2024
How to Easily Deploy Harvester on ARM-Based Servers
Nov 17th, 2025