Environment Setup
Setup the online harvester
- Use ipxe vagrant example to setup a 3 nodes cluster https://github.com/harvester/ipxe-examples/tree/main/vagrant-pxe-harvester
- Enable vlan on
harvester-mgmt - Now harvester dashboard page will out of work
- Create ubuntu cloud image from URL
- Create virtual machine with name
vlan1and id:1 - Create virtual machine and assign vlan network, confirm can get ip address
Setup squid HTTP proxy server
- Move to vagrant pxe harvester folder
- Execute
vagrant ssh pxe_server - Run
apt-get install squid - Edit
/etc/squid/squid.confand add line
http_access allow all
http_port 3128
- Run
systemctl restart squid
Setup the airgapped harvester
- Create an ubuntu virtual machine on localhost machine
- Assign
harvesterandvagrant-libvirtnetwork to the virtual machine - Run
curl -fsSL https://get.docker.com | bashto install docker - Pull latest rancher image
docker pull rancher/rancher:2.6-head - Query default route
ip r - Remove default route
ip r delete {delte route} - Run rancher container by command:
$ sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 \
-e HTTP_PROXY="http://192.168.0.1:3128" \
-e HTTPS_PROXY="http://192.168.0.1:3128" \
-e NO_PROXY="localhost,127.0.0.1,0.0.0.0,10.0.0.0/8,cattle-system.svc,192.168.0.0/24,.svc,.cluster.local,example.com" \
--privileged rancher/rancher:v2.6.2
- Login rancher and set access url
Test steps
- Follow steps in
01-Import existing Harvester clusters in Rancherto import harvester - Follow steps in
22-Create RKE2 Kubernetes Clusterto provision RKE2 cluster
Expected Results
- Can import harvester from Rancher correctly
- Can access downstream harvester cluster from Rancher dashboard
- Can provision at least one node RKE2 cluster to harvester correctly with running status
- Can explore provisioned RKE2 cluster nodes
- RKE2 cluster VM created running correctly on harvester node