Files
runner-images/images/win/scripts/Installers/Install-KubernetesTools.ps1
Mikhail Timofeev 2ee29eddc1 [Windows] Add more docker tests and move K8s tools into single provisioner (#2583)
* Add more docker tests

* Rework tools installation and test

* remove docker tests from tools

* get back kind installation

* transform kind download link to string

* add Add-MachinePathItem after kind installation
2021-01-29 11:38:57 +03:00

24 lines
1.0 KiB
PowerShell

################################################################################
## File: Install-KubernetesTools.ps1
## Desc: Install tools for K8s.
################################################################################
Write-Host "Install Kind"
# Choco installation can't be used because it depends on docker-desktop
$url = 'https://api.github.com/repos/kubernetes-sigs/kind/releases/latest'
[System.String] $kindDownloadLink = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "kind-windows-amd64"
$destFilePath = "C:\ProgramData\kind"
$null = New-Item -Path $destFilePath -ItemType Directory -Force
Start-DownloadWithRetry -Url $kindDownloadLink -Name "kind.exe" -DownloadPath $destFilePath
Add-MachinePathItem $destFilePath
Write-Host "Install Kubectl"
Choco-Install -PackageName kubernetes-cli
Write-Host "Install Helm"
Choco-Install -PackageName kubernetes-helm
Write-Host "Install Minikube"
Choco-Install -PackageName minikube
Invoke-PesterTests -TestFile "Tools" -TestName "KubernetesTools"