Add Extra Flags to Kubelet to enable extra feature 64/464/1
authortrevortao <trevor.tao@arm.com>
Wed, 13 Mar 2019 03:35:41 +0000 (11:35 +0800)
committertrevortao <trevor.tao@arm.com>
Wed, 13 Mar 2019 03:35:41 +0000 (11:35 +0800)
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 <trevor.tao@arm.com>
src/foundation/scripts/k8s_master.sh

index 1782769..5eb9082 100755 (executable)
@@ -10,6 +10,9 @@ if [ -z "${MGMT_IP}" ]; then
   exit 1
 fi
 
   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 \
 if ! kubectl get nodes; then
   sudo kubeadm config images pull
   sudo kubeadm init \