Skip to content

Commit

Permalink
Add temp kubelet fix
Browse files Browse the repository at this point in the history
The K8s master jobs with containerd fail due to some kubelet flags
being completely removed.

This was fixed in the image-builder via:
kubernetes-sigs/image-builder#783

This temporary fix will be removed once new images are released
with the image-builder fix included.
  • Loading branch information
Ionut Balutoiu committed Jan 25, 2022
1 parent 01fc75f commit 33b5f60
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions e2e-runner/e2e_runner/scripts/kubeadm-bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
16 changes: 16 additions & 0 deletions e2e-runner/e2e_runner/scripts/kubelet-start.ps1
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 33b5f60

Please sign in to comment.