From 07d0d3682a19be33d0cf0d49dbd5c7cde8bcc8be Mon Sep 17 00:00:00 2001 From: antongisli Date: Sat, 20 Nov 2021 17:45:05 +0100 Subject: [PATCH] Update maas-setup.sh --- maas-setup.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/maas-setup.sh b/maas-setup.sh index bf2a825..1c8bfa6 100644 --- a/maas-setup.sh +++ b/maas-setup.sh @@ -168,7 +168,30 @@ kubectl get pods -n hello-kubecon sudo iptables -t nat -A PREROUTING -p tcp -i enp6s0 \ --dport 8000 -j DNAT --to-destination 10.10.10.5:80 -#if you want to persist this, run sudo dpkg-reconfigure iptables-persistent +# if you want to persist this, run sudo dpkg-reconfigure iptables-persistent + +# scale our kubernetes cluster - find a machine (avoid kubernetes-master) +juju switch maas-cloud-default +juju status + +# add a kubernetes-worker +juju add-unit kubernetes-worker --to 2 + +# add another kubecon unit +juju add-unit -n 1 hello-kubecon +juju status + +# what happened to the ingress? +kubectl get ingress -n hello-kubecon + +# exercise for the reader - iptables round robin :) + + +# if you want to test destroying your hello-kubecon: +juju destroy-model hello-kubecon --release-storage + +# if you want to destroy your kubenetes controller for juju +juju destroy-controller my-k8s # Now you should be able to open a browser and navigate to http://your-machines-real-ip:8000