2020-05-01 22:07:59 +00:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
server:
|
|
|
|
image: "rancher/k3s"
|
|
|
|
restart: always
|
2020-05-17 18:20:29 +00:00
|
|
|
command: server --disable traefik --disable local-storage --kubelet-arg authentication-token-webhook --kubelet-arg authorization-mode=Webhook
|
2020-05-01 22:07:59 +00:00
|
|
|
tmpfs:
|
|
|
|
- /run
|
|
|
|
- /var/run
|
|
|
|
privileged: true
|
|
|
|
environment:
|
2020-05-14 13:52:49 +00:00
|
|
|
- K3S_CLUSTER_SECRET=${K3S_CLUSTER_SECRET:-replaceme}
|
2020-05-16 02:19:37 +00:00
|
|
|
- K3S_KUBECONFIG_OUTPUT=/host/kubectl/kubeconfig.yaml
|
2020-05-01 22:07:59 +00:00
|
|
|
- K3S_KUBECONFIG_MODE=666
|
|
|
|
volumes:
|
|
|
|
- k3s_data:/var/lib/rancher/k3s
|
2020-05-17 18:20:29 +00:00
|
|
|
- nfs_data:/srv/nfs
|
2020-05-01 22:07:59 +00:00
|
|
|
- .:/host
|
|
|
|
ports:
|
2020-05-16 02:19:37 +00:00
|
|
|
- 80:30080
|
|
|
|
- 443:30443
|
2020-05-01 22:07:59 +00:00
|
|
|
- 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
|
2020-05-14 13:52:49 +00:00
|
|
|
- K3S_CLUSTER_SECRET=${K3S_CLUSTER_SECRET:-replaceme}
|
2020-05-17 18:20:29 +00:00
|
|
|
volumes:
|
|
|
|
- nfs_data:/srv/nfs
|
2020-05-01 22:07:59 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
k3s_data:
|
2020-05-17 18:20:29 +00:00
|
|
|
nfs_data:
|