Skip to content

Instantly share code, notes, and snippets.

@robraux
Created December 7, 2020 17:54
Show Gist options
  • Save robraux/21621e3890cbbb381e578ab43aa2909d to your computer and use it in GitHub Desktop.
Save robraux/21621e3890cbbb381e578ab43aa2909d to your computer and use it in GitHub Desktop.
Kuma demo in k3s

Make sure k3s is executable, it's a Linux only app right now and I'm on Mac 11.0.1 so:

brew cask install multipass

Execute the VM (deliberately large):

multipass launch --name k3s --mem 5G --disk 10G

Enter the VM:

multipass shell k3s

Inside the VM, or Linux local: Install the latest version of k3s. If you are on a supported Linux distro you can skip right here.

curl -sfL https://get.k3s.io | sh

Install Kuma:

curl -L https://kuma.io/installer.sh | sh -

As root, from here if using multipass:

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
./kuma-1.0.3/bin/kumactl install control-plane | kubectl apply -f -
kubectl apply -f https://bit.ly/demokuma

Outside the VM/local (make sure you have the right IP's)

sudo ssh \
      -i /var/root/Library/Application\ Support/multipassd/ssh-keys/id_rsa \
      -L 8080:10.43.84.74:8080 \
      ubuntu@192.168.64.5

Now access: http://localhost:8080 and you will see the demo application, all containers have correct sidecars.


cleanup:

multipass delete k3s
multipass purge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment