Skip to content

Instantly share code, notes, and snippets.

@alexellis
Last active September 4, 2022 10:27
Show Gist options
  • Select an option

  • Save alexellis/09b708a8ddeeb1aa07ec276cd8ab228a to your computer and use it in GitHub Desktop.

Select an option

Save alexellis/09b708a8ddeeb1aa07ec276cd8ab228a to your computer and use it in GitHub Desktop.

Revisions

  1. alexellis revised this gist Oct 21, 2020. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions install-k3sup.sh
    Original file line number Diff line number Diff line change
    @@ -23,19 +23,23 @@ k3sup join --user pi --ip 192.168.2.123 --server-ip 192.168.2.147 \
    --server \
    --print-command

    echo Installing Agent 2
    echo Installing Agent 1
    k3sup join --user pi --ip 192.168.2.129 --server-ip 192.168.2.147 \
    --k3s-channel $CH \
    --print-command

    # More at https://k3sup.dev

    # Install cert-manager
    arkade install cert-manager

    # Install OpenFaaS
    arkade install cert-manager
    arkade install openfaas

    # Install inlets-operator
    arkade install inlets-operator --provider digitalocean --region lon1 --license-file ~/LICENSE --token-file ~/Downloads/do-access-token
    arkade install inlets-operator --provider digitalocean \
    --region lon1 --license-file ~/LICENSE \
    --token-file ~/Downloads/do-access-token

    # Get the public IP

  2. alexellis revised this gist Oct 21, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion install-k3sup.sh
    Original file line number Diff line number Diff line change
    @@ -17,9 +17,10 @@ k3sup join --user pi --ip 192.168.2.141 --server-ip 192.168.2.147 \
    --server \
    --print-command

    echo Installing Agent 1
    echo Installing Server 3
    k3sup join --user pi --ip 192.168.2.123 --server-ip 192.168.2.147 \
    --k3s-channel $CH \
    --server \
    --print-command

    echo Installing Agent 2
  3. alexellis revised this gist Oct 21, 2020. 1 changed file with 29 additions and 0 deletions.
    29 changes: 29 additions & 0 deletions install-k3sup.sh
    Original file line number Diff line number Diff line change
    @@ -28,3 +28,32 @@ k3sup join --user pi --ip 192.168.2.129 --server-ip 192.168.2.147 \
    --print-command

    # More at https://k3sup.dev


    # Install OpenFaaS
    arkade install cert-manager

    # Install inlets-operator
    arkade install inlets-operator --provider digitalocean --region lon1 --license-file ~/LICENSE --token-file ~/Downloads/do-access-token

    # Get the public IP

    kubectl get svc -n kube-system -w

    # Create a DNS A record for that IP

    # Generate an Ingress record for OpenFaaS

    arkade install openfaas-ingress --ingress-class traefik --email alex@kubecon.k3sup.dev --domain kubecon.k3sup.dev

    # Log in to openfaas

    faas-cli login -g https://kubecon.k3sup.dev

    # Deploy a function

    faas-cli store deploy --platform armhf nodeinfo -g https://kubecon.k3sup.dev

    # Invoke the function

    curl https://kubecon.k3sup.dev/function/nodeinfo
  4. alexellis revised this gist Oct 21, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion install-k3sup.sh
    Original file line number Diff line number Diff line change
    @@ -25,4 +25,6 @@ k3sup join --user pi --ip 192.168.2.123 --server-ip 192.168.2.147 \
    echo Installing Agent 2
    k3sup join --user pi --ip 192.168.2.129 --server-ip 192.168.2.147 \
    --k3s-channel $CH \
    --print-command
    --print-command

    # More at https://k3sup.dev
  5. alexellis created this gist Oct 21, 2020.
    28 changes: 28 additions & 0 deletions install-k3sup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    #!/bin/bash

    set -e

    CH=latest

    echo Installing Server 1
    k3sup install --user pi --ip 192.168.2.147 \
    --k3s-channel $CH \
    --cluster \
    --print-command \
    --skip-install

    echo Installing Server 2
    k3sup join --user pi --ip 192.168.2.141 --server-ip 192.168.2.147 \
    --k3s-channel $CH \
    --server \
    --print-command

    echo Installing Agent 1
    k3sup join --user pi --ip 192.168.2.123 --server-ip 192.168.2.147 \
    --k3s-channel $CH \
    --print-command

    echo Installing Agent 2
    k3sup join --user pi --ip 192.168.2.129 --server-ip 192.168.2.147 \
    --k3s-channel $CH \
    --print-command