Last active
July 28, 2024 23:02
-
-
Save tekh/b8a9f9d3a107e7bd7d98bb1a433ddf2f to your computer and use it in GitHub Desktop.
rke2_agent_install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #How to add rke2 agents; | |
| ## Tested on Ubuntu Server 22.04LTS, minimal install. Seems to have no issues, a little less ram used (30meg) and saving about 2gb of HD space | |
| ### On the server | |
| # Retrieve the server token located in /var/lib/rancher/rke2/server/node-token | |
| ### On the nodes (run as root!); | |
| systemctl stop --now ufw | |
| apt update && apt install byobu nano fail2ban nfs-common -y && apt dist-upgrade -y && systemctl enable --now fail2ban && apt autoremove -y && byobu-enable && byobu | |
| # Run the installer | |
| curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE="agent" sh - | |
| # Configure the rke2-agent service | |
| mkdir -p /etc/rancher/rke2/ | |
| nano /etc/rancher/rke2/config.yaml | |
| # Content for config.yaml: | |
| server: https://<server>:9345 | |
| token: <token from server node> | |
| # Enable && Start the service | |
| systemctl enable --now rke2-agent.service | |
| # Follow the logs, if you like | |
| journalctl -u rke2-agent -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment