aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2021-03-15 20:41:19 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-03-16 09:30:48 -0400
commita50389a985f98ab6fd194fb045796111872efd4a (patch)
tree3d432e1651f5e24e5ec2255254be57d192b5542a
parent5d7d39943f02b74be6d77f706d06323fda998c4e (diff)
downloadmeta-virtualization-a50389a985f98ab6fd194fb045796111872efd4a.tar.gz
meta-virtualization-a50389a985f98ab6fd194fb045796111872efd4a.tar.bz2
meta-virtualization-a50389a985f98ab6fd194fb045796111872efd4a.zip
k3s: clean up README
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-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 e4cb3e3..d167bcd 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):
```shell
k3s-agent -t <token> -s https://<master>:6443
```
-
(Here `<token>` is found in `/var/lib/rancher/k3s/server/node-token` at the
k3s master.)
@@ -34,22 +33,55 @@ Example:
k3s-agent -t /var/lib/rancher/k3s/server/node-token -s https://localhost:6443
```
+If you are running an all in one node (both the server and agent) for testing
+purposes, do not run the above script. It will perform cleanup and break flannel
+networking on your host.
+
+Instead, run the following (note the space between 'k3s' and 'agent'):
+
+```shell
+k3s agent -t /var/lib/rancher/k3s/server/token --server http://localhost:6443/
+```
+
## Notes:
-if running under qemu, the default of 256M of memory is not enough, k3s will
-OOM and exit.
+Memory:
+
+ if running under qemu, the default of 256M of memory is not enough, k3s will
+ OOM and exit.
-Boot with qemuparams="-m 2048" to boot with 2G of memory (or choose the
-appropriate amount for your configuration)
+ Boot with qemuparams="-m 2048" to boot with 2G of memory (or choose the
+ appropriate amount for your configuration)
-Disk: if using qemu and core-image* you'll need to add extra space in your disks
-to ensure containers can start. The following in your image recipe, or local.conf
-would add 2G of extra space to the rootfs:
+Disk:
+
+ if using qemu and core-image* you'll need to add extra space in your disks
+ to ensure containers can start. The following in your image recipe, or
+ local.conf would add 2G of extra space to the rootfs:
```shell
IMAGE_ROOTFS_EXTRA_SPACE = "2097152"
```
+## Example qemux86-64 boot line:
+
+```shell
+runqemu qemux86-64 nographic kvm slirp qemuparams="-m 2048"
+```
+
+k3s logs can be seen via:
+
+
+```shell
+% journalctl -u k3s
+```
+
+or
+
+```shell
+% journalctl -xe
+```
+
## Example output from qemux86-64 running k3s server:
```shell
@@ -57,7 +89,6 @@ root@qemux86-64:~# kubectl get nodes
NAME STATUS ROLES AGE VERSION
qemux86-64 Ready master 46s v1.18.9-k3s1
-
root@qemux86-64:~# kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
local-path-provisioner-6d59f47c7-h7lxk 1/1 Running 0 2m32s
@@ -234,5 +265,4 @@ Events:
Normal NodeHasNoDiskPressure 10m (x2 over 10m) kubelet Node qemux86-64 status is now: NodeHasNoDiskPressure
Normal NodeHasSufficientPID 10m (x2 over 10m) kubelet Node qemux86-64 status is now: NodeHasSufficientPID
Normal NodeReady 10m kubelet Node qemux86-64 status is now: NodeReady
-
-```shell
+```