@@ -59,20 +59,27 @@ For more details see: [Multi Cluster on isolated networks](#multi-cluster-on-iso
5959
6060### Version mapping
6161Implementation of additional features brings complexity and sometimes may happen that extra feature is broken in special cases.
62- To prevent potential issues due to usage such versions, the k3d, k3s versions are hard-coded .
62+ To prevent potential issues due to usage such versions, the k3d version is predefined .
6363
6464| k3d-action | k3d | k3s |
6565| :----------:| :-------:| :-----------------------:|
6666| v1.1.0 | [ v3.4.0] ( https://github.com/rancher/k3d/releases/tag/v3.4.0 ) | [ rancher/k3s: v1 .20.2-k3s1] ( https://github.com/k3s-io/k3s/releases/tag/v1.20.2%2Bk3s1 ) |
6767| v1.2.0 | [ v4.2.0] ( https://github.com/rancher/k3d/releases/tag/v4.2.0 ) | [ rancher/k3s: v1 .20.2-k3s1] ( https://github.com/k3s-io/k3s/releases/tag/v1.20.2%2Bk3s1 ) |
6868| v1.3.0 | [ v4.2.0] ( https://github.com/rancher/k3d/releases/tag/v4.2.0 ) | [ rancher/k3s: v1 .20.4-k3s1] ( https://github.com/k3s-io/k3s/releases/tag/v1.20.4%2Bk3s1 ) |
69+ | v1.4.0 | [ v4.4.1] ( https://github.com/rancher/k3d/releases/tag/v4.4.1 ) | specified by k3d or [ set image explicitly] ( https://hub.docker.com/r/rancher/k3s/tags?page=1&ordering=last_updated ) |
6970
71+ From ` v1.4.0 ` would k3d-action users set k3s version explicitly via [ configuration] ( #config-file-support ) or
72+ argument e.g.` --image docker.io/rancher/k3s:v1.20.4-k3s1 ` otherwise k3d specifies which version will be used.
73+
74+ For further k3s details see:
75+ - docker [ rancher/k3s] ( https://hub.docker.com/r/rancher/k3s/tags?page=2&ordering=last_updated )
76+ - github [ k3s/releases] ( https://github.com/k3s-io/k3s/releases )
7077
7178## Single Cluster
7279Although AbsaOSS/k3d-action strongly supports multi-cluster. Single cluster scenarios are very popular. The minimum single-cluster
7380configuration looks like this :
7481``` yaml
75- - uses : AbsaOSS/k3d-action@v1.3.1
82+ - uses : AbsaOSS/k3d-action@v1.4.0
7683 name : " Create Single Cluster"
7784 with :
7885 cluster-name : " test-cluster-1"
@@ -82,7 +89,7 @@ k3d creates a cluster with one worker node (with [traefik](https://traefik.io/)
8289default load-balancer node. In real scenarios you might prefer to do some port mapping and disable default load balancer.
8390Such an action would look like this:
8491` ` ` yaml
85- - uses : AbsaOSS/k3d-action@v1.3.1
92+ - uses : AbsaOSS/k3d-action@v1.4.0
8693 name : " Create Single Cluster"
8794 with :
8895 cluster-name : " test-cluster-1"
@@ -92,6 +99,7 @@ Such an action would look like this:
9299 -p "5053:53/udp@agent[0]"
93100 --agents 3
94101 --no-lb
102+ --image docker.io/rancher/k3s:v1.20.4-k3s1
95103 --k3s-server-arg "--no-deploy=traefik,servicelb,metrics-server"
96104` ` `
97105The created cluster exposes two TCP (` :8083`,`:8443`) and one UDP (`:5053`) ports. The cluster comprises one server, three
@@ -120,6 +128,7 @@ configured.
120128` ` ` yaml
121129apiVersion: k3d.io/v1alpha2
122130kind: Simple
131+ image: docker.io/rancher/k3s:v1.20.5-k3s1
123132servers: 1
124133agents: 3 # The action will overwrite this by 1
125134ports:
@@ -157,7 +166,7 @@ manually.
157166# ## Multi Cluster on default network
158167` ` ` yaml
159168 - uses: actions/checkout@v2
160- - uses: AbsaOSS/k3d-action@v1.3.1
169+ - uses: AbsaOSS/k3d-action@v1.4.0
161170 name: "Create 1st Cluster"
162171 with:
163172 cluster-name: "test-cluster-1"
@@ -168,7 +177,7 @@ manually.
168177 --agents 3
169178 --no-lb
170179 --k3s-server-arg "--no-deploy=traefik,servicelb,metrics-server"
171- - uses: AbsaOSS/k3d-action@v1.3.1
180+ - uses: AbsaOSS/k3d-action@v1.4.0
172181 name: "Create 2nd Cluster"
173182 with:
174183 cluster-name: "test-cluster-2"
@@ -181,7 +190,7 @@ manually.
181190 --k3s-server-arg "--no-deploy=traefik,servicelb,metrics-server"
182191` ` `
183192Both clusters comprise one server node and three agents nodes. Because of port collision, each cluster must expose
184- different ports.
193+ different ports. Because k3s version is not specified, the clusters will run against latest k3s.
185194
186195For more details see :
187196 - multi-cluster [Demo](https://github.com/AbsaOSS/k3d-action/actions?query=workflow%3A%22Multi+cluster%3B+two+clusters+on+default+network%22),
@@ -191,7 +200,7 @@ For more details see:
191200
192201# ## Multi Cluster on isolated networks
193202` ` ` yaml
194- - uses: AbsaOSS/k3d-action@v1.3.1
203+ - uses: AbsaOSS/k3d-action@v1.4.0
195204 name: "Create 1st Cluster in 172.20.0.0/24"
196205 id: test-cluster-1
197206 with:
@@ -206,7 +215,7 @@ For more details see:
206215 --no-lb
207216 --k3s-server-arg "--no-deploy=traefik,servicelb,metrics-server"
208217
209- - uses: AbsaOSS/k3d-action@v1.3.1
218+ - uses: AbsaOSS/k3d-action@v1.4.0
210219 name: "Create 2nd Cluster in 172.20.1.0/24"
211220 id: test-cluster-2
212221 with:
@@ -239,7 +248,7 @@ For more details see: [Demo](https://github.com/AbsaOSS/k3d-action/actions?query
239248[Source](./.github/workflows/multi-cluster-on-isolated-networks.yaml)
240249# ## Two pairs of clusters on two isolated networks
241250` ` ` yaml
242- - uses: AbsaOSS/k3d-action@v1.3.1
251+ - uses: AbsaOSS/k3d-action@v1.4.0
243252 name: "Create 1st Cluster in 172.20.0.0/24"
244253 with:
245254 cluster-name: "test-cluster-1-a"
@@ -250,7 +259,7 @@ For more details see: [Demo](https://github.com/AbsaOSS/k3d-action/actions?query
250259 --no-lb
251260 --k3s-server-arg "--no-deploy=traefik,servicelb,metrics-server"
252261
253- - uses: AbsaOSS/k3d-action@v1.3.1
262+ - uses: AbsaOSS/k3d-action@v1.4.0
254263 name: "Create 2nd Cluster in 172.20.0.0/24"
255264 with:
256265 cluster-name: "test-cluster-2-a"
@@ -260,7 +269,7 @@ For more details see: [Demo](https://github.com/AbsaOSS/k3d-action/actions?query
260269 --no-lb
261270 --k3s-server-arg "--no-deploy=traefik,servicelb,metrics-server"
262271
263- - uses: AbsaOSS/k3d-action@v1.3.1
272+ - uses: AbsaOSS/k3d-action@v1.4.0
264273 name: "Create 1st Cluster in 172.20.1.0/24"
265274 with:
266275 cluster-name: "test-cluster-1-b"
@@ -271,7 +280,7 @@ For more details see: [Demo](https://github.com/AbsaOSS/k3d-action/actions?query
271280 --no-lb
272281 --k3s-server-arg "--no-deploy=traefik,servicelb,metrics-server"
273282
274- - uses: AbsaOSS/k3d-action@v1.3.1
283+ - uses: AbsaOSS/k3d-action@v1.4.0
275284 name: "Create 2nd Cluster in 172.20.1.0/24"
276285 with:
277286 cluster-name: "test-cluster-2-b"
@@ -300,7 +309,7 @@ Example below demonstrates how to interact with imported docker registry:
300309` ` ` yaml
301310 steps:
302311 - uses: actions/checkout@v2
303- - uses: AbsaOSS/k3d-action@v1.3.1
312+ - uses: AbsaOSS/k3d-action@v1.4.0
304313 id: single-cluster
305314 name: "Create single k3d Cluster with imported Registry"
306315 with:
0 commit comments