@@ -30,6 +30,7 @@ How do you say it? Ketchup, as in tomato.
3030 - [ Merging clusters into your KUBECONFIG] ( #merging-clusters-into-your-kubeconfig )
3131 - [ 😸 Join some agents to your Kubernetes server] ( #-join-some-agents-to-your-kubernetes-server )
3232 - [ Use your hardware authentication / 2FA or SSH Agent] ( #use-your-hardware-authentication--2fa-or-ssh-agent )
33+ - [ K3sup plan for automation] ( #k3sup-plan-for-automation )
3334 - [ Create a multi-master (HA) setup with external SQL] ( #create-a-multi-master-ha-setup-with-external-sql )
3435 - [ Create a multi-master (HA) setup with embedded etcd] ( #create-a-multi-master-ha-setup-with-embedded-etcd )
3536 - [ 👨💻 Micro-tutorial for Raspberry Pi (2, 3, or 4) 🥧] ( #-micro-tutorial-for-raspberry-pi-2-3-or-4- )
@@ -285,6 +286,60 @@ Now run any `k3sup` command, and your SSH key will be requested from the ssh-age
285286
286287You can also specify an SSH key with ` --ssh-key ` if you want to use a specific key-pair.
287288
289+ ### K3sup plan for automation
290+
291+ A new command was added to k3sup to help with automating large amounts of nodes.
292+
293+ ` k3sup plan ` reads a JSON input file containing hosts, and will generate an installation command for a number of servers and agents.
294+
295+ Example input file:
296+
297+ ``` json
298+ [
299+ {
300+ "hostname" : " node-a-1" ,
301+ "ip" : " 192.168.129.138"
302+ },
303+ {
304+ "hostname" : " node-a-2" ,
305+ "ip" : " 192.168.129.128"
306+ },
307+ {
308+ "hostname" : " node-a-3" ,
309+ "ip" : " 192.168.129.131"
310+ },
311+ {
312+ "hostname" : " node-a-4" ,
313+ "ip" : " 192.168.129.130"
314+ },
315+ {
316+ "hostname" : " node-a-5" ,
317+ "ip" : " 192.168.129.127"
318+ }
319+ ]
320+ ```
321+
322+ The following will create 1x primary server, with 2x additional servers within a HA etcd cluster, the last two nodes will be added as agents:
323+
324+ ``` bash
325+ k3sup plan \
326+ devices.json \
327+ --user ubuntu \
328+ --servers 3 \
329+ --background > bootstrap.sh
330+ ```
331+
332+ Then make the file executable and run it:
333+
334+ ``` bash
335+ chmod +x bootstrap.sh
336+ ./bootstrap.sh
337+ ```
338+
339+ Watch a demo with dozens of Firecracker VMs: [ Testing Kubernetes at Scale with bare-metal] ( https://youtu.be/o4UxRw-Cc8c )
340+
341+ The initial version of ` k3sup plan ` has a reduced set of flags such as ` --k3s-extra-args ` , but contributions are welcomed from users and sponsors.
342+
288343### Create a multi-master (HA) setup with external SQL
289344
290345The easiest way to test out k3s' multi-master (HA) mode with external storage, is to set up a Mysql server using DigitalOcean's managed service.
0 commit comments