From 9c50c90d2074080bd5bdb46589fe3fdc82a45688 Mon Sep 17 00:00:00 2001 From: trevortao Date: Wed, 13 Mar 2019 11:35:41 +0800 Subject: [PATCH] Add Extra Flags to Kubelet to enable extra feature Add the following extra flags to 10-kubeadm.conf for Kubelet to start correctly and support hugepage requirement by SEBA and other pods --fail-swap-on=false --feature-gates HugePages=false Change-Id: I9e3084cd8b47d3d1b74165782340521c48acfad6 Signed-off-by: trevortao --- src/foundation/scripts/k8s_master.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/foundation/scripts/k8s_master.sh b/src/foundation/scripts/k8s_master.sh index 1782769..5eb9082 100755 --- a/src/foundation/scripts/k8s_master.sh +++ b/src/foundation/scripts/k8s_master.sh @@ -10,6 +10,9 @@ if [ -z "${MGMT_IP}" ]; then exit 1 fi +#Add extra flags to Kubelet +sed '/Environment=\"KUBELET_CONFIG_ARGS/a\Environment=\"KUBELET_EXTRA_ARGS=--fail-swap-on=false --feature-gates HugePages=false\"' -i /etc/systemd/system/kubelet.service.d/10-kubeadm.conf + if ! kubectl get nodes; then sudo kubeadm config images pull sudo kubeadm init \ -- 2.16.6