wiki.getshifting.com

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


wsl
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wsl [2025/07/28 19:58] – created - external edit 127.0.0.1wsl [2025/07/29 05:53] (current) sjoerd
Line 3: Line 3:
 **Summary**: This wiki page shows how to install and configure WSL for use with all sort of DevOps tools like kubernetes, helm, Argo CD and more. \\ **Summary**: This wiki page shows how to install and configure WSL for use with all sort of DevOps tools like kubernetes, helm, Argo CD and more. \\
 **Date**: 28 July 2025 \\ **Date**: 28 July 2025 \\
-{{tag>windows bash azure kubernetes helm argocd}}+{{tag>windows bash azurecli kubernetes helm argocd}}
  
 WSL is the Windows Subsystem for Linux, which allows you to run a Linux distribution alongside your Windows installation. This is particularly useful for DevOps engineers who need to work with tools that are more commonly used in Linux environments. WSL is the Windows Subsystem for Linux, which allows you to run a Linux distribution alongside your Windows installation. This is particularly useful for DevOps engineers who need to work with tools that are more commonly used in Linux environments.
Line 9: Line 9:
 == Installing WSL == == Installing WSL ==
  
-To install WSL, you can simply run the command {{{wsl --install}}} in a PowerShell or Command Prompt window with administrator privileges. This will install the default Linux distribution (usually Ubuntu) and set up WSL 2. This is the preferred version as it provides better performance and compatibility with Linux applications. See the [[https://learn.microsoft.com/en-us/windows/wsl/install |official WSL installation guide]] for more details. The guide below assumes you're using Ubuntu as your WSL distribution. This is the default, but in case you've installed a different distribution, the command to install Ubuntu is: {{{wsl --install -d Ubuntu}}}.+To install WSL, you can simply run the command {{{wsl --install}}} in a PowerShell or Command Prompt window with administrator privileges. This will install the default Linux distribution (usually Ubuntu) and set up WSL 2. This is the preferred version as it provides better performance and compatibility with Linux applications. See the [[https://learn.microsoft.com/en-us/windows/wsl/install |official WSL installation guide]] for more details. The guide below assumes you're using Ubuntu as your WSL distribution. This is the default, but in case you've installed a different distribution, the command to install Ubuntu is: {{{wsl --install -d Ubuntu}}}. After the installation a prompt will tell you to setup a local user account. 
 + 
 +> Note: After installation of WSL a reboot might be required.
  
 I also recommend to install the [[https://learn.microsoft.com/en-us/windows/terminal/install |Windows Terminal from the Microsoft Store]], which provides a better command line experience than the default console. I also recommend to install the [[https://learn.microsoft.com/en-us/windows/terminal/install |Windows Terminal from the Microsoft Store]], which provides a better command line experience than the default console.
Line 28: Line 30:
 </code> </code>
  
-<WRAP important>Be sure to start Docker Desktop before you start WSL if you plan to use Docker commands.</WRAP>+<WRAP info>Be sure to start Docker Desktop before you start WSL if you plan to use Docker commands.</WRAP
 + 
 +=== Azure CLI === 
 + 
 +Azure CLI is a cross-platform command-line tool for managing Azure resources with interactive commands or scripts. To install [[https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux |azure cli in WSL]] you can run the following command: 
 + 
 +<code bash> 
 +curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash 
 +# Verify the installation 
 +az version 
 +</code>
  
 === Kubectl === === Kubectl ===
  
-> Note that kubectl can also be installed using the Azure CLI as shown below. The following instructions are for manual installation.+> Note that kubectl can also be installed using the Azure CLI with {{{az aks install-cli}}}. The following instructions are for manual installation.
  
 Kubectl is the command-line tool for interacting with Kubernetes clusters. To install [[https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/ |kubectl in WSL]], follow these steps: Kubectl is the command-line tool for interacting with Kubernetes clusters. To install [[https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/ |kubectl in WSL]], follow these steps:
Line 123: Line 135:
 # Verify the installation # Verify the installation
 kustomize version kustomize version
-</code> 
- 
-=== Azure CLI === 
- 
-The Azure CLI is a command-line tool for managing Azure resources. To install [[https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt |Azure CLI in WSL]], follow these steps: 
- 
-<code bash> 
-# Download and install the Microsoft signing key 
-# Download and install the Microsoft signing key 
-sudo mkdir -p /etc/apt/keyrings 
-curl -sLS https://packages.microsoft.com/keys/microsoft.asc | 
-    gpg --dearmor | 
-    sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null 
-sudo chmod go+r /etc/apt/keyrings/microsoft.gpg 
-# Add the Azure CLI software repository 
-AZ_REPO=$(lsb_release -cs) 
-echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | 
-    sudo tee /etc/apt/sources.list.d/azure-cli.list 
-# Update repository information and install the azure-cli package 
-sudo apt-get update 
-sudo apt-get install azure-cli -y 
-# Verify the installation 
-az version 
-</code> 
- 
-==== Azure CLI Extensions ==== 
- 
-You can install Azure CLI extensions to enhance its functionality. For example, to install the Azure Kubernetes Service (AKS) extension, run: 
- 
-<code bash> 
-az extension add --name aks-preview 
-# Use the following command to install kubectl and kubelogin using the Azure CLI 
-az aks install-cli 
 </code> </code>
  
 === Kubelogin === === Kubelogin ===
  
-> Note that kubelogin can also be installed using the Azure CLI as shown above. The following instructions are for manual installation.+> Note that kubelogin  can also be installed using the Azure CLI with {{{az aks install-cli}}}. The following instructions are for manual installation.
  
 Kubelogin is a tool that allows you to authenticate to Kubernetes clusters using Azure Active Directory. To install [[https://github.com/Azure/kubelogin/releases |Kubelogin in WSL]], follow these steps: Kubelogin is a tool that allows you to authenticate to Kubernetes clusters using Azure Active Directory. To install [[https://github.com/Azure/kubelogin/releases |Kubelogin in WSL]], follow these steps:
wsl.1753732684.txt.gz · Last modified: by 127.0.0.1