reem
June 16, 2021, 2:06pm
1
hello everyone,
when were trying to adding windows node to the cluster, we try to install kubeadm.exe, kubelet.exe and other URLs in PrepareNode.ps to add it to our environment but the URLs does not exist
such as https://dl.k8s.io/$KubernetesVersion/bin/windows/amd64/kubelet.exe
source code in this URL
https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/kubeadm/scripts/PrepareNode.ps1
What is the value of $KubernetesVersion
?
.PARAMETER ContainerRuntime
Container that Kubernetes will use. (Docker or containerD)
.EXAMPLE
PS> .\PrepareNode.ps1 -KubernetesVersion v1.19.3 -ContainerRuntime containerD
#>
Param(
[parameter(Mandatory = $true, HelpMessage="Kubernetes version to use")]
[string] $KubernetesVersion,
[parameter(HelpMessage="Container runtime that Kubernets will use")]
[ValidateSet("containerD", "Docker")]
[string] $ContainerRuntime = "Docker"
)
$ErrorActionPreference = 'Stop'
function DownloadFile($destination, $source) {
Write-Host("Downloading $source to $destination")
curl.exe --silent --fail -Lo $destination $source
reem
June 16, 2021, 5:20pm
3
Kubernetes version : 1.17.2
Try v1.17.2
instead. I figured this out from the example usage that the script provides:
PS> .\PrepareNode.ps1 -KubernetesVersion v1.19.3 -ContainerRuntime containerD
Also the documentation here hints to the formatting as well.