commit 58c28a85aa99973b5adb48484aa6ab63ce4bbceb Author: Massaki Archambault Date: Fri May 1 18:07:59 2020 -0400 initial commit diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b04043f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,38 @@ +version: '3' +services: + server: + image: "rancher/k3s" + restart: always + command: server --no-deploy traefik --kubelet-arg authentication-token-webhook --kubelet-arg authorization-mode=Webhook + tmpfs: + - /run + - /var/run + privileged: true + environment: + - K3S_CLUSTER_SECRET=${K3S_CLUSTER_SECRET:?err} + - K3S_KUBECONFIG_OUTPUT=/host/kubeconfig.yaml + - K3S_KUBECONFIG_MODE=666 + volumes: + - k3s_data:/var/lib/rancher/k3s + - .:/host + - ./manifests:/var/lib/rancher/k3s/server/manifests/host + ports: + - 80:80 + - 443:443 + - 6443:6443 + agent: + image: "rancher/k3s" + restart: always + command: agent --kubelet-arg authentication-token-webhook --kubelet-arg authorization-mode=Webhook + tmpfs: + - /run + - /var/run + privileged: true + environment: + - K3S_URL=https://server:6443 + - K3S_CLUSTER_SECRET=${K3S_CLUSTER_SECRET:?err} + +volumes: + k3s_data: + +