From b6725a1b119016e5cf281d659ae4c0626fa0f792 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 12 Sep 2017 13:07:48 +0100 Subject: [PATCH] kubernetes: give more resources to worker nodes. The sock-shop demo[0] requires around 5G of images on a worker node and 3G of RAM (if there is only one worker node and therefore everything runs on that node). Since the master is more than happy with the 4G disk and 1G RAM it is given today split the settings into master and node specific and bump only the latter. KUBE_PORT_BASE is unused and was already removed in 54ddde0d4344 but accidentally reintroduced (by me) in 62aa9248a406, whack it again. [0] https://microservices-demo.github.io/microservices-demo Signed-off-by: Ian Campbell --- projects/kubernetes/boot.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/projects/kubernetes/boot.sh b/projects/kubernetes/boot.sh index 97f15aa89..218a6c512 100755 --- a/projects/kubernetes/boot.sh +++ b/projects/kubernetes/boot.sh @@ -2,10 +2,14 @@ set -e -: ${KUBE_PORT_BASE:=2222} -: ${KUBE_VCPUS:=2} -: ${KUBE_MEM:=1024} -: ${KUBE_DISK:=4G} +: ${KUBE_MASTER_VCPUS:=2} +: ${KUBE_MASTER_MEM:=1024} +: ${KUBE_MASTER_DISK:=4G} + +: ${KUBE_NODE_VCPUS:=2} +: ${KUBE_NODE_MEM:=4096} +: ${KUBE_NODE_DISK:=8G} + : ${KUBE_NETWORKING:=default} : ${KUBE_RUN_ARGS:=} : ${KUBE_EFI:=} @@ -19,6 +23,10 @@ if [ $# -eq 0 ] ; then img="kube-master" data="" state="kube-master-state" + + : ${KUBE_VCPUS:=$KUBE_MASTER_VCPUS} + : ${KUBE_MEM:=$KUBE_MASTER_MEM} + : ${KUBE_DISK:=$KUBE_MASTER_DISK} elif [ $# -gt 1 ] ; then case $1 in ''|*[!0-9]*) @@ -36,6 +44,10 @@ elif [ $# -gt 1 ] ; then shift data="${*}" state="kube-${name}-state" + + : ${KUBE_VCPUS:=$KUBE_NODE_VCPUS} + : ${KUBE_MEM:=$KUBE_NODE_MEM} + : ${KUBE_DISK:=$KUBE_NODE_DISK} else echo "Usage:" echo " - Boot master:"