You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should now be able to create the VMs we need to test k3s:
# Run the VMs
vagrant up
This should spin up 3 Ubuntu 22.04 VMs with their respective hostnames and IP addresses as defined on the Vagrantfile.
Update firewall
For Ubuntu VMs, a few extra steps are needed:
# It is recommended to turn off ufw (uncomplicated firewall)
ufw disable
# If you wish to keep ufw enabled, by default, the following rules are required
ufw allow 6443/tcp #apiserver
ufw allow from 10.42.0.0/16 to any #pods
ufw allow from 10.43.0.0/16 to any #services
MASTER
On the master VM, install k3s:
# Install k3s as the master
curl -sfL https://get.k3s.io | sh -
# Check that the service is running
systemctl status k3s
# Check the nodes
k3s kubectl get nodes
Get the token we need to use when installing k3s on the other nodes:
cat /var/lib/rancher/k3s/server/node-token
NODE1
On the node1 VM, install k3s as an agent:
# Install k3s as an agent node
curl -sfL https://get.k3s.io | K3S_URL=https://<MASTER_IP>:6443 K3S_TOKEN=<TOKEN> sh -
NODE2
On the node2 VM, install k3s as an agent:
# Install k3s as an agent node
curl -sfL https://get.k3s.io | K3S_URL=https://<MASTER_IP>:6443 K3S_TOKEN=<TOKEN> sh -
Expected behavior:
The agent nodes should be able to connect to the master node.
Actual behavior:
The installation on both agent nodes get stuck at and eventually times out:
The agent can't connect to the server. Did you need to use --node-ip on the server to tell it to use the IP address of a different interface for cluster communication? Or do you need to open up ports on that node so that the agent can connect?
Environmental Info:
K3s Version:
Node(s) CPU architecture, OS, and Version:
root@master:/home/vagrant# uname -a Linux master 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
1 server, 2 agents:
Describe the bug:
When setting up the agent nodes, I get the following errors:
Steps To Reproduce:
K3S
Use Vagrant to easily spin multiple VMs (requires VirtualBox). First we need to install both packages:
# Install virtualbox and vagrant sudo apt install virtualbox vagrant -y
We should now be able to create the VMs we need to test k3s:
# Run the VMs vagrant up
This should spin up 3 Ubuntu 22.04 VMs with their respective hostnames and IP addresses as defined on the Vagrantfile.
Update firewall
For Ubuntu VMs, a few extra steps are needed:
MASTER
On the
master
VM, install k3s:Get the token we need to use when installing k3s on the other nodes:
NODE1
On the
node1
VM, install k3s as an agent:NODE2
On the
node2
VM, install k3s as an agent:Expected behavior:
The agent nodes should be able to connect to the master node.
Actual behavior:
The installation on both agent nodes get stuck at and eventually times out:
Additional context / logs:
The text was updated successfully, but these errors were encountered: