2020-05-01 22:07:59 +00:00
|
|
|
version: '3'
|
|
|
|
services:
|
2020-05-18 20:18:39 +00:00
|
|
|
# startup:
|
|
|
|
# image: bash:5
|
|
|
|
# command: -xe /host/startup.sh
|
|
|
|
# volumes:
|
|
|
|
# - manifests:/manifests
|
|
|
|
# - .:/host:ro
|
2020-05-01 22:07:59 +00:00
|
|
|
server:
|
2020-05-18 20:18:39 +00:00
|
|
|
image: rancher/k3s
|
2020-05-01 22:07:59 +00:00
|
|
|
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:
|
2020-05-18 20:18:39 +00:00
|
|
|
- /run
|
|
|
|
- /var/run
|
2020-05-01 22:07:59 +00:00
|
|
|
privileged: true
|
|
|
|
environment:
|
2020-05-18 20:18:39 +00:00
|
|
|
- K3S_CLUSTER_SECRET=${K3S_CLUSTER_SECRET:-replaceme}
|
|
|
|
- K3S_KUBECONFIG_OUTPUT=/host/kubectl/kubeconfig.yaml
|
|
|
|
- K3S_KUBECONFIG_MODE=666
|
2020-05-01 22:07:59 +00:00
|
|
|
volumes:
|
2020-05-18 20:18:39 +00:00
|
|
|
- k3s_data:/var/lib/rancher/k3s
|
|
|
|
- nfs_data:/srv/nfs
|
|
|
|
- manifests:/var/lib/rancher/k3s/server/manifests/manifests:ro
|
|
|
|
- .:/host
|
2020-05-01 22:07:59 +00:00
|
|
|
ports:
|
2020-08-02 01:49:55 +00:00
|
|
|
- 80:80
|
|
|
|
- 443:443
|
2020-05-01 22:07:59 +00:00
|
|
|
- 6443:6443
|
|
|
|
agent:
|
2020-05-18 20:18:39 +00:00
|
|
|
image: rancher/k3s
|
2020-05-01 22:07:59 +00:00
|
|
|
restart: always
|
|
|
|
command: agent --kubelet-arg authentication-token-webhook --kubelet-arg authorization-mode=Webhook
|
|
|
|
tmpfs:
|
2020-05-18 20:18:39 +00:00
|
|
|
- /run
|
|
|
|
- /var/run
|
2020-05-01 22:07:59 +00:00
|
|
|
privileged: true
|
|
|
|
environment:
|
2020-05-18 20:18:39 +00:00
|
|
|
- K3S_URL=https://server:6443
|
|
|
|
- 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-18 20:18:39 +00:00
|
|
|
nfs_data:
|
|
|
|
manifests:
|
|
|
|
driver_opts:
|
|
|
|
type: tmpfs
|
|
|
|
device: tmpfs
|