forked from janvda/balena-node-red-mqtt-nginx-TIG-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk3s_docker-compose.yml
44 lines (43 loc) · 1.24 KB
/
k3s_docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '2'
services:
server:
image: rancher/k3s:v0.5.0-arm
command: server --disable-agent
environment:
- K3S_CLUSTER_SECRET=somethingtotallyrandom
- K3S_KUBECONFIG_OUTPUT=/output/kubeconfig.yaml
- K3S_KUBECONFIG_MODE=666
volumes:
- k3s-server:/var/lib/rancher/k3s
# This is just so that we get the kubeconfig file out
- kubeconfig:/output
ports:
- 6443:6443
labels:
io.balena.features.dbus: '1'
io.balena.features.balena-socket: '1'
node:
#image: rancher/k3s:v0.5.0-arm
build: k3s-agent
tmpfs:
- /run
- /var/run
privileged: true
#command: agent --docker
command: start.sh
depends_on:
- server
# balena doesnt support bind mounts
#volumes:
#- /var/run/balena.sock:/var/run/docker.sock
environment:
- K3S_URL=https://server:6443
- K3S_CLUSTER_SECRET=somethingtotallyrandom
# Can also use K3S_TOKEN from /var/lib/rancher/k3s/server/node-token instead of K3S_CLUSTER_SECRET
#- K3S_TOKEN=K13849a67fc385fd3c0fa6133a8649d9e717b0258b3b09c87ffc33dae362c12d8c0::node:2e373dca319a0525745fd8b3d8120d9c
labels:
io.balena.features.dbus: '1'
io.balena.features.balena-socket: '1'
volumes:
k3s-server: {}
kubeconfig: {}