updated post

This commit is contained in:
Solomon Laing 2021-12-21 20:22:12 +10:30
parent 6f4b516bcf
commit e4e1283466

View File

@ -45,7 +45,7 @@ network:
Also set timezone if you want.
``` bash
```shell
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
``` bash
```shell
apt install bison flex libssl-dev bc -y
```
@ -72,8 +72,7 @@ apt install bison flex libssl-dev bc -y
Run the following on all nodes:
``` bash
```shell
iptables -F \
&& update-alternatives --set iptables /usr/sbin/iptables-legacy \
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
@ -93,7 +92,7 @@ ufw disable
Then run the following only on the master node:
``` bash
```shell
# for master
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s - --docker
@ -107,7 +106,7 @@ cat /var/lib/rancher/k3s/server/node-token
Then run the following on the worker nodes, updating the command for each:
``` bash
```shell
# for workers
# 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
@ -117,7 +116,7 @@ systemctl status k3s-agent
And thus you should be done, check the master node to see:
``` bash
```shell
# Check node was added on master
kubectl get nodes
```
@ -186,7 +185,7 @@ ansible_python_interpreter=/usr/bin/python3
Then the following commands:
``` bash
```shell
sudo iptables -F \
&& sudo update-alternatives --set iptables /usr/sbin/iptables-legacy \
&& sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
@ -197,13 +196,13 @@ useful command formatted from step 2.2.1 of reference material [here](https://le
Then the following on the master node:
``` bash
```shell
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
```
Then on the master node grab its node token
``` bash
```shell
sudo cat /var/lib/rancher/k3s/server/node-token
```
@ -216,7 +215,7 @@ YOURTOKEN = token from above
servername = unique name for node (I use hostname)
``` bash
```shell
curl -sfL https://get.k3s.io | K3S_TOKEN="YOURTOKEN" K3S_URL="https://[your server]:6443" K3S_NODE_NAME="servername" sh -z
# I used