This commit is contained in:
James Turland 2023-12-05 23:01:24 +00:00
parent eb7f1da64a
commit dcafeaa651
1 changed files with 12 additions and 10 deletions

View File

@ -1,22 +1,24 @@
# Create directory
```
mkdir -p /etc/rancher/rke2
mkdir -p /etc/rancher/rke2
```
# Create File for RKE2 - Config
```
sudo touch /etc/rancher/rke2/config.yaml
echo "token: <ADD-TOKEN>" >> /etc/rancher/rke2/config.yaml
echo "server: https://<ADD-VIP>:9345" >> /etc/rancher/rke2/config.yaml
echo "node-label:" >> /etc/rancher/rke2/config.yaml
echo " - worker=true" >> /etc/rancher/rke2/config.yaml
echo " - longhorn=true" >> /etc/rancher/rke2/config.yaml
sudo nano /etc/rancher/rke2/config.yaml
```
# Add values
token: <ADD-TOKEN>
server: https://<ADD-VIP>:9345
node-label:
- worker=true
- longhorn=true
```
# Install RKE2
```
curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE="agent" sh -
curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE="agent" sh -
```
# Enable RKE2
```
systemctl enable rke2-agent.service
systemctl start rke2-agent.service
systemctl enable rke2-agent.service
systemctl start rke2-agent.service
```