Unable to connect to proxy when setting up agent nodes #9861
-
Environmental Info: root@master:/home/vagrant# k3s -v
k3s version v1.28.8+k3s1 (653dd61a)
go version go1.21.8 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:
K3SUse 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 firewallFor 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 MASTEROn the # 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 NODE1On the # Install k3s as an agent node
curl -sfL https://get.k3s.io | K3S_URL=https://<MASTER_IP>:6443 K3S_TOKEN=<TOKEN> sh - NODE2On the # 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:
Additional context / logs:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
I believe there were issues with older iptables but when I looked at my version, it seems to be okay: root@master:/home/vagrant# iptables --version
iptables v1.8.7 (nf_tables) |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
https://docs.k3s.io/installation/configuration#configuration-file
You can create the config file before installation, or pass the arg to the install script.