Content
Kubernetes
More
Oracle ARM64 Ubuntu 24.04 quirks for K3s
By default, the Ampere A1-based ARM64 VMs from Oracle Cloud with Ubuntu 24.04 come with some unwanted defaults for a K3s Kubernetes setup.
Changes
These were the changes made to each instance:
- Remove iptables rules
# Apply live
sudo iptables -D FORWARD -j REJECT --reject-with icmp-host-prohibited 2>/dev/null
sudo iptables-legacy -D FORWARD -j REJECT --reject-with icmp-host-prohibited 2>/dev/null
# Persist changes
sudo vim /etc/iptables/rules.v4
# COMMENT OUT OR DELETE:
# -A INPUT -j REJECT --reject-with icmp-host-prohibited
# COMMENT OUT OR DELETE:
# -A FORWARD -j REJECT --reject-with icmp-host-prohibited
- Increase limits via sysctl
# Apply live
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl fs.inotify.max_user_instances=512
# Persist changes
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.d/99-kubernetes.conf
echo "fs.inotify.max_user_instances=512" | sudo tee -a /etc/sysctl.d/99-kubernetes.conf
sudo sysctl --system
- Use legacy iptables backend
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
Additional notes
-
Do NOT run Docker alongside K3s.
-
Do NOT use
ufw/firewalldor any other firewall.