diff --git a/e2e-runner/e2e_runner/scripts/kubeadm-bootstrap.ps1 b/e2e-runner/e2e_runner/scripts/kubeadm-bootstrap.ps1 index c09708b5..8d7542f2 100644 --- a/e2e-runner/e2e_runner/scripts/kubeadm-bootstrap.ps1 +++ b/e2e-runner/e2e_runner/scripts/kubeadm-bootstrap.ps1 @@ -149,6 +149,7 @@ function Update-Kubernetes { foreach($bin in $binaries) { Start-FileDownload "$CIPackagesBaseURL/$CIVersion/bin/windows/amd64/$bin" "$KUBERNETES_DIR\$bin" } + Start-FileDownload "$CIPackagesBaseURL/scripts/kubelet-start.ps1" "$KUBERNETES_DIR\StartKubelet.ps1" } function Update-SDNCNI { diff --git a/e2e-runner/e2e_runner/scripts/kubelet-start.ps1 b/e2e-runner/e2e_runner/scripts/kubelet-start.ps1 new file mode 100644 index 00000000..717ba373 --- /dev/null +++ b/e2e-runner/e2e_runner/scripts/kubelet-start.ps1 @@ -0,0 +1,16 @@ +$FileContent = Get-Content -Path "/var/lib/kubelet/kubeadm-flags.env" +$kubeAdmArgs = $FileContent.TrimStart('KUBELET_KUBEADM_ARGS=').Trim('"') + +$args = "--cert-dir=$env:SYSTEMDRIVE/var/lib/kubelet/pki", + "--config=$env:SYSTEMDRIVE/var/lib/kubelet/config.yaml", + "--bootstrap-kubeconfig=$env:SYSTEMDRIVE/etc/kubernetes/bootstrap-kubelet.conf", + "--kubeconfig=$env:SYSTEMDRIVE/etc/kubernetes/kubelet.conf", + "--hostname-override=$(hostname)", + "--pod-infra-container-image=`"k8s.gcr.io/pause:3.6`"", + "--enable-debugging-handlers", + "--cgroups-per-qos=false", + "--enforce-node-allocatable=`"`"", + "--resolv-conf=`"`"" + +$kubeletCommandLine = "$env:SYSTEMDRIVE\k\kubelet.exe " + ($args -join " ") + " $kubeAdmArgs" +Invoke-Expression $kubeletCommandLine