updated post
This commit is contained in:
parent
bcc37bbb67
commit
6f4b516bcf
@ -45,7 +45,7 @@ network:
|
|||||||
|
|
||||||
Also set timezone if you want.
|
Also set timezone if you want.
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
sudo timedatectl set-timezone Australia/Adelaide
|
sudo timedatectl set-timezone Australia/Adelaide
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ We must rebuild kernel with updated options so that cgroup_pids is enabled. Hard
|
|||||||
|
|
||||||
note that the following tools are required for the build: bison, flex, libssl-dev, and bc
|
note that the following tools are required for the build: bison, flex, libssl-dev, and bc
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
apt install bison flex libssl-dev bc -y
|
apt install bison flex libssl-dev bc -y
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -72,7 +72,8 @@ apt install bison flex libssl-dev bc -y
|
|||||||
|
|
||||||
Run the following on all nodes:
|
Run the following on all nodes:
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
|
|
||||||
iptables -F \
|
iptables -F \
|
||||||
&& update-alternatives --set iptables /usr/sbin/iptables-legacy \
|
&& update-alternatives --set iptables /usr/sbin/iptables-legacy \
|
||||||
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
|
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
|
||||||
@ -92,7 +93,7 @@ ufw disable
|
|||||||
|
|
||||||
Then run the following only on the master node:
|
Then run the following only on the master node:
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
# for master
|
# for master
|
||||||
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s - --docker
|
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s - --docker
|
||||||
|
|
||||||
@ -106,7 +107,7 @@ cat /var/lib/rancher/k3s/server/node-token
|
|||||||
|
|
||||||
Then run the following on the worker nodes, updating the command for each:
|
Then run the following on the worker nodes, updating the command for each:
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
# for workers
|
# for workers
|
||||||
# Fill this out ...
|
# Fill this out ...
|
||||||
curl -sfL http://get.k3s.io | K3S_URL=https://<master_IP>:6443 K3S_TOKEN=<join_token> K3S_NODE_NAME="odroid-mc1-X" sh -s - --docker
|
curl -sfL http://get.k3s.io | K3S_URL=https://<master_IP>:6443 K3S_TOKEN=<join_token> K3S_NODE_NAME="odroid-mc1-X" sh -s - --docker
|
||||||
@ -116,7 +117,7 @@ systemctl status k3s-agent
|
|||||||
|
|
||||||
And thus you should be done, check the master node to see:
|
And thus you should be done, check the master node to see:
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
# Check node was added on master
|
# Check node was added on master
|
||||||
kubectl get nodes
|
kubectl get nodes
|
||||||
```
|
```
|
||||||
@ -185,7 +186,7 @@ ansible_python_interpreter=/usr/bin/python3
|
|||||||
|
|
||||||
Then the following commands:
|
Then the following commands:
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
sudo iptables -F \
|
sudo iptables -F \
|
||||||
&& sudo update-alternatives --set iptables /usr/sbin/iptables-legacy \
|
&& sudo update-alternatives --set iptables /usr/sbin/iptables-legacy \
|
||||||
&& sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
|
&& sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
|
||||||
@ -196,13 +197,13 @@ useful command formatted from step 2.2.1 of reference material [here](https://le
|
|||||||
|
|
||||||
Then the following on the master node:
|
Then the following on the master node:
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
|
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
|
||||||
```
|
```
|
||||||
|
|
||||||
Then on the master node grab its node token
|
Then on the master node grab its node token
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
sudo cat /var/lib/rancher/k3s/server/node-token
|
sudo cat /var/lib/rancher/k3s/server/node-token
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -215,7 +216,7 @@ YOURTOKEN = token from above
|
|||||||
|
|
||||||
servername = unique name for node (I use hostname)
|
servername = unique name for node (I use hostname)
|
||||||
|
|
||||||
```bash
|
``` bash
|
||||||
curl -sfL https://get.k3s.io | K3S_TOKEN="YOURTOKEN" K3S_URL="https://[your server]:6443" K3S_NODE_NAME="servername" sh -z
|
curl -sfL https://get.k3s.io | K3S_TOKEN="YOURTOKEN" K3S_URL="https://[your server]:6443" K3S_NODE_NAME="servername" sh -z
|
||||||
|
|
||||||
# I used
|
# I used
|
||||||
|
|||||||
Reference in New Issue
Block a user