12
12
13
13
minimumLimaVersion : 1.1.0
14
14
15
- base :
16
- - template://_images/ubuntu-lts
15
+ base : template://_images/ubuntu-lts
17
16
18
17
# Mounts are disabled in this template, but can be enabled optionally.
19
18
mounts : []
@@ -24,44 +23,44 @@ containerd:
24
23
user : false
25
24
26
25
provision :
27
- - mode : system
28
- script : |
29
- #!/bin/bash
30
- set -eux -o pipefail
31
- command -v k0s >/dev/null 2>&1 && exit 0
26
+ - mode : system
27
+ script : |
28
+ #!/bin/bash
29
+ set -eux -o pipefail
30
+ command -v k0s >/dev/null 2>&1 && exit 0
32
31
33
- # install k0s prerequisites
34
- curl -sfL https://get.k0s.sh | sh
32
+ # install k0s prerequisites
33
+ curl -sfL https://get.k0s.sh | sh
35
34
36
- - mode : system
37
- script : |
38
- #!/bin/bash
39
- set -eux -o pipefail
35
+ - mode : system
36
+ script : |
37
+ #!/bin/bash
38
+ set -eux -o pipefail
40
39
41
- # start k0s as a single node cluster
42
- if ! systemctl status k0scontroller >/dev/null 2>&1; then
43
- k0s install controller --single
44
- fi
40
+ # start k0s as a single node cluster
41
+ if ! systemctl status k0scontroller >/dev/null 2>&1; then
42
+ k0s install controller --single
43
+ fi
45
44
46
- systemctl start k0scontroller
45
+ systemctl start k0scontroller
47
46
48
47
probes :
49
- - description : " k0s to be running"
50
- script : |
51
- #!/bin/bash
52
- set -eux -o pipefail
53
- if ! timeout 30s bash -c "until sudo test -f /var/lib/k0s/pki/admin.conf; do sleep 3; done"; then
54
- echo >&2 "k0s kubeconfig file has not yet been created"
55
- exit 1
56
- fi
57
- hint : |
58
- The k0s control plane is not ready yet.
59
- Run "limactl shell k0s sudo journalctl -u k0scontroller" to debug.
48
+ - description : " k0s to be running"
49
+ script : |
50
+ #!/bin/bash
51
+ set -eux -o pipefail
52
+ if ! timeout 30s bash -c "until sudo test -f /var/lib/k0s/pki/admin.conf; do sleep 3; done"; then
53
+ echo >&2 "k0s kubeconfig file has not yet been created"
54
+ exit 1
55
+ fi
56
+ hint : |
57
+ The k0s control plane is not ready yet.
58
+ Run "limactl shell k0s sudo journalctl -u k0scontroller" to debug.
60
59
61
60
copyToHost :
62
- - guest : " /var/lib/k0s/pki/admin.conf"
63
- host : " {{.Dir}}/copied-from-guest/kubeconfig.yaml"
64
- deleteOnStop : true
61
+ - guest : " /var/lib/k0s/pki/admin.conf"
62
+ host : " {{.Dir}}/copied-from-guest/kubeconfig.yaml"
63
+ deleteOnStop : true
65
64
message : |
66
65
To run `kubectl` on the host (assumes kubectl is installed), run the following commands:
67
66
------
0 commit comments