forked from rootless-containers/usernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
49 lines (49 loc) · 1.15 KB
/
docker-compose.yaml
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
45
46
47
48
49
# Use `make up`, not `docker compose up`,
# as this YAML requires ${U7S_...} variables to be set.
---
services:
node:
build: .
hostname: ${U7S_NODE_NAME}
privileged: true
restart: always
ports:
# etcd
- 2379:2379
# kube-apiserver
- 6443:6443
# kubelet
- 10250:10250
# flannel
- 8472:8472/udp
volumes:
- .:/usernetes:ro
- /boot:/boot:ro
- /lib/modules:/lib/modules:ro
- node-var:/var
- node-opt:/opt
- node-etc:/etc
- type: tmpfs
target: /run
- type: tmpfs
target: /tmp
working_dir: /usernetes
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
U7S_HOST_IP: ${U7S_HOST_IP}
sysctls:
- net.ipv4.ip_forward=1
# In addition, `net.ipv4.conf.default.rp_filter`
# has to be set to 0 (disabled) or 2 (loose)
# in the daemon's network namespace.
networks:
default:
ipam:
config:
# Each of the nodes has to have a different IP.
# The node IP here is not accessible from other nodes.
- subnet: ${U7S_NODE_SUBNET}
volumes:
node-var: {}
node-opt: {}
node-etc: {}