summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-containers/k3s/README.md52
1 files changed, 41 insertions, 11 deletions
diff --git a/recipes-containers/k3s/README.md b/recipes-containers/k3s/README.md
index e4cb3e33..d167bcdb 100644
--- a/recipes-containers/k3s/README.md
+++ b/recipes-containers/k3s/README.md
@@ -25,7 +25,6 @@ The convenience script `k3s-agent` can be used to set up a k3s agent (service):
25```shell 25```shell
26k3s-agent -t <token> -s https://<master>:6443 26k3s-agent -t <token> -s https://<master>:6443
27``` 27```
28
29(Here `<token>` is found in `/var/lib/rancher/k3s/server/node-token` at the 28(Here `<token>` is found in `/var/lib/rancher/k3s/server/node-token` at the
30k3s master.) 29k3s master.)
31 30
@@ -34,22 +33,55 @@ Example:
34k3s-agent -t /var/lib/rancher/k3s/server/node-token -s https://localhost:6443 33k3s-agent -t /var/lib/rancher/k3s/server/node-token -s https://localhost:6443
35``` 34```
36 35
36If you are running an all in one node (both the server and agent) for testing
37purposes, do not run the above script. It will perform cleanup and break flannel
38networking on your host.
39
40Instead, run the following (note the space between 'k3s' and 'agent'):
41
42```shell
43k3s agent -t /var/lib/rancher/k3s/server/token --server http://localhost:6443/
44```
45
37## Notes: 46## Notes:
38 47
39if running under qemu, the default of 256M of memory is not enough, k3s will 48Memory:
40OOM and exit. 49
50 if running under qemu, the default of 256M of memory is not enough, k3s will
51 OOM and exit.
41 52
42Boot with qemuparams="-m 2048" to boot with 2G of memory (or choose the 53 Boot with qemuparams="-m 2048" to boot with 2G of memory (or choose the
43appropriate amount for your configuration) 54 appropriate amount for your configuration)
44 55
45Disk: if using qemu and core-image* you'll need to add extra space in your disks 56Disk:
46to ensure containers can start. The following in your image recipe, or local.conf 57
47would add 2G of extra space to the rootfs: 58 if using qemu and core-image* you'll need to add extra space in your disks
59 to ensure containers can start. The following in your image recipe, or
60 local.conf would add 2G of extra space to the rootfs:
48 61
49```shell 62```shell
50IMAGE_ROOTFS_EXTRA_SPACE = "2097152" 63IMAGE_ROOTFS_EXTRA_SPACE = "2097152"
51``` 64```
52 65
66## Example qemux86-64 boot line:
67
68```shell
69runqemu qemux86-64 nographic kvm slirp qemuparams="-m 2048"
70```
71
72k3s logs can be seen via:
73
74
75```shell
76% journalctl -u k3s
77```
78
79or
80
81```shell
82% journalctl -xe
83```
84
53## Example output from qemux86-64 running k3s server: 85## Example output from qemux86-64 running k3s server:
54 86
55```shell 87```shell
@@ -57,7 +89,6 @@ root@qemux86-64:~# kubectl get nodes
57NAME STATUS ROLES AGE VERSION 89NAME STATUS ROLES AGE VERSION
58qemux86-64 Ready master 46s v1.18.9-k3s1 90qemux86-64 Ready master 46s v1.18.9-k3s1
59 91
60
61root@qemux86-64:~# kubectl get pods -n kube-system 92root@qemux86-64:~# kubectl get pods -n kube-system
62NAME READY STATUS RESTARTS AGE 93NAME READY STATUS RESTARTS AGE
63local-path-provisioner-6d59f47c7-h7lxk 1/1 Running 0 2m32s 94local-path-provisioner-6d59f47c7-h7lxk 1/1 Running 0 2m32s
@@ -234,5 +265,4 @@ Events:
234 Normal NodeHasNoDiskPressure 10m (x2 over 10m) kubelet Node qemux86-64 status is now: NodeHasNoDiskPressure 265 Normal NodeHasNoDiskPressure 10m (x2 over 10m) kubelet Node qemux86-64 status is now: NodeHasNoDiskPressure
235 Normal NodeHasSufficientPID 10m (x2 over 10m) kubelet Node qemux86-64 status is now: NodeHasSufficientPID 266 Normal NodeHasSufficientPID 10m (x2 over 10m) kubelet Node qemux86-64 status is now: NodeHasSufficientPID
236 Normal NodeReady 10m kubelet Node qemux86-64 status is now: NodeReady 267 Normal NodeReady 10m kubelet Node qemux86-64 status is now: NodeReady
237 268```
238```shell