# 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: {}