mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #223 from dominictayloruk/docker-fix
Update docker-compose for v0.2.0, add agent docker-compose, update re…
This commit is contained in:
commit
cd1339b742
|
@ -194,6 +194,13 @@ serves as an example of how to run k3s from Docker. To run from `docker-compose
|
|||
d54c8b17c055 Ready <none> 11s v1.13.2-k3s2
|
||||
db7a5a5a5bdd Ready <none> 12s v1.13.2-k3s2
|
||||
|
||||
To run the agent only in Docker use the following `docker-compose-agent.yml` is in the root of this repo that
|
||||
serves as an example of how to run k3s agent from Docker. Alternatively the Docker run command can also be used;
|
||||
|
||||
sudo docker run -d --tmpfs /run --tmpfs /var/run -e K3S_URL=${SERVER_URL} -e K3S_TOKEN=${NODE_TOKEN} --privileged rancher/k3s:v0.2.0
|
||||
|
||||
sudo docker run -d --tmpfs /run --tmpfs /var/run -e K3S_URL=https://k3s.example.com:6443 -e K3S_TOKEN=K13849a67fc385fd3c0fa6133a8649d9e717b0258b3b09c87ffc33dae362c12d8c0::node:2e373dca319a0525745fd8b3d8120d9c --privileged rancher/k3s:v0.2.0
|
||||
|
||||
|
||||
Hyperkube
|
||||
--------
|
||||
|
|
13
docker-compose-agent.yml
Normal file
13
docker-compose-agent.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
version: '3'
|
||||
services:
|
||||
node:
|
||||
image: rancher/k3s:v0.2.0
|
||||
tmpfs:
|
||||
- /run
|
||||
- /var/run
|
||||
privileged: true
|
||||
environment:
|
||||
- K3S_URL=https://server:6443
|
||||
- K3S_CLUSTER_SECRET=somethingtotallyrandom
|
||||
# Can also use K3S_TOKEN from /var/lib/rancher/k3s/server/node-token instead of K3S_CLUSTER_SECRET
|
||||
#- K3S_TOKEN=K13849a67fc385fd3c0fa6133a8649d9e717b0258b3b09c87ffc33dae362c12d8c0::node:2e373dca319a0525745fd8b3d8120d9c
|
|
@ -1,7 +1,7 @@
|
|||
version: '3'
|
||||
services:
|
||||
server:
|
||||
image: rancher/k3s:v0.1.0
|
||||
image: rancher/k3s:v0.2.0
|
||||
command: server --disable-agent
|
||||
environment:
|
||||
- K3S_CLUSTER_SECRET=somethingtotallyrandom
|
||||
|
@ -15,7 +15,7 @@ services:
|
|||
- 6443:6443
|
||||
|
||||
node:
|
||||
image: rancher/k3s:v0.1.0
|
||||
image: rancher/k3s:v0.2.0
|
||||
tmpfs:
|
||||
- /run
|
||||
- /var/run
|
||||
|
@ -23,6 +23,8 @@ services:
|
|||
environment:
|
||||
- K3S_URL=https://server:6443
|
||||
- K3S_CLUSTER_SECRET=somethingtotallyrandom
|
||||
# Can also use K3S_TOKEN from /var/lib/rancher/k3s/server/node-token instead of K3S_CLUSTER_SECRET
|
||||
#- K3S_TOKEN=K13849a67fc385fd3c0fa6133a8649d9e717b0258b3b09c87ffc33dae362c12d8c0::node:2e373dca319a0525745fd8b3d8120d9c
|
||||
|
||||
volumes:
|
||||
k3s-server: {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user