snippets/powershell/instalar-docker-kubernetes-win2k22.ps1
2024-10-03 01:47:38 +02:00

22 lines
1.2 KiB
PowerShell

# Bajar la imagen https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022
# Instalar Windows Server 2022
# Instalar Docker licencia Apache en Windows
# Abrir y ejecutar los siguientes comandos en un PowerShell como Administrador
#------------- Instalar Docker desde PowerShell en Windows Server -------------
Install-PackageProvider -Name NuGet -Force
Install-Module PowerShellGet -AllowClobber -Force
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
# Set the TLS version used by the PowerShell client to TLS 1.2.
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;
Install-Package -Name docker -ProviderName DockerMsftProvider
Restart-Computer -Force
# Si no funciona al reiniciar tenemos que reiniciar el servicio
Get-Service docker | Restart-Service
#------------------------------------------------------------------------------
# Para instalar Kubernetes en Windows Server ejecutar en un PowerShell
# https://github.com/microsoft/SDN/blob/master/Kubernetes/windows/install.ps1
$ScriptURL = https://raw.githubusercontent.com/microsoft/SDN/master/Kubernetes/windows/install.ps1
iex (iwr $ScriptURL).Content