Windows

Preparation

Install Docker

prepare.ps1
1
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
2
Install-Package -Name Docker -ProviderName DockerMsftProvider
3
Restart-Computer -Force
Copied!

Copy ~/.kube/config from master

Copy the ~/.kube/config from a master node and place it on the windows node under C:\k\config

Download kubectl.exe

get_kubectl.ps1
1
Install-Script -Name install-kubectl -Scope CurrentUser -Force
2
install-kubectl.ps1 -DownloadLocation C:\k
Copied!
1
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
2
wget https://github.com/Microsoft/SDN/archive/master.zip -o master.zip
3
Expand-Archive master.zip -DestinationPath master
4
mkdir C:/k/
5
mv master/SDN-master/Kubernetes/windows/* C:/k/
6
rm -recurse -force master,master.zip
Copied!

Add to PATH

1
$env:Path += ";C:\k"
2
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\k", [EnvironmentVariableTarget]::Machine)
3
4
$env:KUBECONFIG="C:\k\config"
5
[Environment]::SetEnvironmentVariable("KUBECONFIG", "C:\k\config", [EnvironmentVariableTarget]::User)
6
7
Copied!

Creating the "pause" image

Now that docker is installed, you need to prepare a "pause" image that's used by Kubernetes to prepare the infrastructure pods.
1
docker pull microsoft/windowsservercore:1709
2
docker tag microsoft/windowsservercore:1709 microsoft/windowsservercore:latest
3
cd C:/k/
4
docker build -t kubeletwin/pause .
Copied!

Other

Install Chocolatey

1
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Copied!

Install kubectl.exe with Chocolatey

1
choco install kubernetes-cli
Copied!
Last modified 3yr ago