- Install updates in windows
Install-Module PSWindowsUpdate
Get-Command -module PSWindowsUpdate
# Add-WUServiceManager -MicrosoftUpdate
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot
## Add SSH
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
Get-NetFirewallRule -Name *ssh*
# There should be a firewall rule named "OpenSSH-Server-In-TCP", which should be enabled
# If the firewall does not exist, create one
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
Useful commands:
https://cloud.google.com/compute/docs/instances/windows/creating-managing-windows-instances#gcloud
# Create instance
gcloud compute instances create win-1 --image-project windows-cloud --image-family windows-server-2019-dc-core-for-containers-v20210212 --machine-type e2-highcpu-16 --metadata=windows-startup-script-url=https://storage.googleapis.com/ygui-gke-dev/prepare-antrea.ps1
- Folders
- K8S_DIR:
C:\etc\kubernetes
- NODE_DIR:
C:\etc\kubernetes\node\bin
- K8S_DIR: