From 6f4b516bcf46aa376f3bf006c5ab132d7e53ec43 Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Tue, 21 Dec 2021 20:14:45 +1030 Subject: [PATCH] updated post --- ...-09_servers_K3s on Odroid MC1s, a Guide.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/posts/2021-08-09_servers_K3s on Odroid MC1s, a Guide.md b/posts/2021-08-09_servers_K3s on Odroid MC1s, a Guide.md index b6136eb..9c95edf 100644 --- a/posts/2021-08-09_servers_K3s on Odroid MC1s, a Guide.md +++ b/posts/2021-08-09_servers_K3s on Odroid MC1s, a Guide.md @@ -45,7 +45,7 @@ network: Also set timezone if you want. -```bash +``` bash 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 +``` bash 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: -```bash +``` bash + iptables -F \ && update-alternatives --set iptables /usr/sbin/iptables-legacy \ && update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \ @@ -92,7 +93,7 @@ ufw disable Then run the following only on the master node: -```bash +``` bash # for master 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: -```bash +``` bash # for workers # Fill this out ... curl -sfL http://get.k3s.io | K3S_URL=https://:6443 K3S_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: -```bash +``` bash # Check node was added on master kubectl get nodes ``` @@ -185,7 +186,7 @@ ansible_python_interpreter=/usr/bin/python3 Then the following commands: -```bash +``` bash sudo iptables -F \ && sudo update-alternatives --set iptables /usr/sbin/iptables-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: -```bash +``` bash curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s - ``` Then on the master node grab its node token -```bash +``` bash 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) -```bash +``` bash curl -sfL https://get.k3s.io | K3S_TOKEN="YOURTOKEN" K3S_URL="https://[your server]:6443" K3S_NODE_NAME="servername" sh -z # I used