WSL+Docker: Kubernetes on the Windows Desktop (2023)

Authors: Nuno do Carmo Docker Captain and WSL Corsair; Ihor Dvoretskyi, Developer Advocate, Cloud Native Computing Foundation

New to Windows 10 and WSL2, or new to Docker and Kubernetes? Welcome to this blog post where we will install from scratch Kubernetes in Docker KinD and Minikube.

For the last few years, Kubernetes became a de-facto standard platform for running containerized services and applications in distributed environments. While a wide variety of distributions and installers exist to deploy Kubernetes in the cloud environments (public, private or hybrid), or within the bare metal environments, there is still a need to deploy and run Kubernetes locally, for example, on the developer's workstation.

Kubernetes has been originally designed to be deployed and used in the Linux environments. However, a good number of users (and not only application developers) use Windows OS as their daily driver. When Microsoft revealed WSL - the Windows Subsystem for Linux, the line between Windows and Linux environments became even less visible.

Also, WSL brought an ability to run Kubernetes on Windows almost seamlessly!

Below, we will cover in brief how to install and use various solutions to run Kubernetes locally.

Since we will explain how to install KinD, we won't go into too much detail around the installation of KinD's dependencies.

However, here is the list of the prerequisites needed and their version/lane:

  • OS: Windows 10 version 2004, Build 19041
  • WSL2 enabled
    • In order to install the distros as WSL2 by default, once WSL2 installed, run the command wsl.exe --set-default-version 2 in Powershell
  • WSL2 distro installed from the Windows Store - the distro used is Ubuntu-18.04
  • Docker Desktop for Windows, stable channel - the version used is 2.2.0.4
  • [Optional] Microsoft Terminal installed from the Windows Store
    • Open the Windows store and type "Terminal" in the search, it will be (normally) the first option

WSL+Docker: Kubernetes on the Windows Desktop (1)

And that's actually it. For Docker Desktop for Windows, no need to configure anything yet as we will explain it in the next section.

Once everything is installed, we can launch the WSL2 terminal from the Start menu, and type "Ubuntu" for searching the applications and documents:

WSL+Docker: Kubernetes on the Windows Desktop (2)

Once found, click on the name and it will launch the default Windows console with the Ubuntu bash shell running.

Like for any normal Linux distro, you need to create a user and set a password:

WSL+Docker: Kubernetes on the Windows Desktop (3)

[Optional] Update the sudoers

As we are working, normally, on our local computer, it might be nice to update the sudoers and set the group %sudo to be password-less:

# Edit the sudoers with the visudo commandsudo visudo# Change the %sudo group to be password-less%sudo ALL=(ALL:ALL) NOPASSWD: ALL# Press CTRL+X to exit# Press Y to save# Press Enter to confirm

WSL+Docker: Kubernetes on the Windows Desktop (4)

Update Ubuntu

Before we move to the Docker Desktop settings, let's update our system and ensure we start in the best conditions:

# Update the repositories and list of the packages availablesudo apt update# Update the system based on the packages installed > the "-y" will approve the change automaticallysudo apt upgrade -y

WSL+Docker: Kubernetes on the Windows Desktop (5)

Before we move into the settings, let's do a small test, it will display really how cool the new integration with Docker Desktop is:

# Try to see if the docker cli and daemon are installeddocker version# Same for kubectlkubectl version

WSL+Docker: Kubernetes on the Windows Desktop (6)

You got an error? Perfect! It's actually good news, so let's now move on to the settings.

Docker Desktop settings: enable WSL2 integration

First let's start Docker Desktop for Windows if it's not still the case. Open the Windows start menu and type "docker", click on the name to start the application:

WSL+Docker: Kubernetes on the Windows Desktop (7)

You should now see the Docker icon with the other taskbar icons near the clock:

(Video) Kubernetes on Windows 10 with Docker Desktop

WSL+Docker: Kubernetes on the Windows Desktop (8)

Now click on the Docker icon and choose settings. A new window will appear:

WSL+Docker: Kubernetes on the Windows Desktop (9)

By default, the WSL2 integration is not active, so click the "Enable the experimental WSL 2 based engine" and click "Apply & Restart":

WSL+Docker: Kubernetes on the Windows Desktop (10)

What this feature did behind the scenes was to create two new distros in WSL2, containing and running all the needed backend sockets, daemons and also the CLI tools (read: docker and kubectl command).

Still, this first setting is still not enough to run the commands inside our distro. If we try, we will have the same error as before.

In order to fix it, and finally be able to use the commands, we need to tell the Docker Desktop to "attach" itself to our distro also:

WSL+Docker: Kubernetes on the Windows Desktop (11)

Let's now switch back to our WSL2 terminal and see if we can (finally) launch the commands:

# Try to see if the docker cli and daemon are installeddocker version# Same for kubectlkubectl version

WSL+Docker: Kubernetes on the Windows Desktop (12)

Tip: if nothing happens, restart Docker Desktop and restart the WSL process in Powershell: Restart-Service LxssManager and launch a new Ubuntu session

And success! The basic settings are now done and we move to the installation of KinD.

Right now, we have Docker that is installed, configured and the last test worked fine.

However, if we look carefully at the kubectl command, it found the "Client Version" (1.15.5), but it didn't find any server.

This is normal as we didn't enable the Docker Kubernetes cluster. So let's install KinD and create our first cluster.

And as sources are always important to mention, we will follow (partially) the how-to on the official KinD website:

# Download the latest version of KinDcurl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64# Make the binary executablechmod +x ./kind# Move the binary to your executable pathsudo mv ./kind /usr/local/bin/

WSL+Docker: Kubernetes on the Windows Desktop (13)

KinD: the first cluster

We are ready to create our first cluster:

# Check if the KUBECONFIG is not setecho $KUBECONFIG# Check if the .kube directory is created > if not, no need to create itls $HOME/.kube# Create the cluster and give it a name (optional)kind create cluster --name wslkind# Check if the .kube has been created and populated with filesls $HOME/.kube

WSL+Docker: Kubernetes on the Windows Desktop (14)

Tip: as you can see, the Terminal was changed so the nice icons are all displayed

The cluster has been successfully created, and because we are using Docker Desktop, the network is all set for us to use "as is".

So we can open the Kubernetes master URL in our Windows browser:

WSL+Docker: Kubernetes on the Windows Desktop (15)

And this is the real strength from Docker Desktop for Windows with the WSL2 backend. Docker really did an amazing integration.

KinD: counting 1 - 2 - 3

Our first cluster was created and it's the "normal" one node cluster:

(Video) Docker and Kubernetes on Windows 10

# Check how many nodes it createdkubectl get nodes# Check the services for the whole clusterkubectl get all --all-namespaces

WSL+Docker: Kubernetes on the Windows Desktop (16)

While this will be enough for most people, let's leverage one of the coolest feature, multi-node clustering:

# Delete the existing clusterkind delete cluster --name wslkind# Create a config file for a 3 nodes clustercat << EOF > kind-3nodes.yamlkind: ClusterapiVersion: kind.x-k8s.io/v1alpha4nodes: - role: control-plane - role: worker - role: workerEOF# Create a new cluster with the config filekind create cluster --name wslkindmultinodes --config ./kind-3nodes.yaml# Check how many nodes it createdkubectl get nodes

WSL+Docker: Kubernetes on the Windows Desktop (17)

Tip: depending on how fast we run the "get nodes" command, it can be that not all the nodes are ready, wait few seconds and run it again, everything should be ready

And that's it, we have created a three-node cluster, and if we look at the services one more time, we will see several that have now three replicas:

# Check the services for the whole clusterkubectl get all --all-namespaces

WSL+Docker: Kubernetes on the Windows Desktop (18)

KinD: can I see a nice dashboard?

Working on the command line is always good and very insightful. However, when dealing with Kubernetes we might want, at some point, to have a visual overview.

For that, the Kubernetes Dashboard project has been created. The installation and first connection test is quite fast, so let's do it:

# Install the Dashboard application into our clusterkubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc6/aio/deploy/recommended.yaml# Check the resources it created based on the new namespace createdkubectl get all -n kubernetes-dashboard

WSL+Docker: Kubernetes on the Windows Desktop (19)

As it created a service with a ClusterIP (read: internal network address), we cannot reach it if we type the URL in our Windows browser:

WSL+Docker: Kubernetes on the Windows Desktop (20)

That's because we need to create a temporary proxy:

# Start a kubectl proxykubectl proxy# Enter the URL on your browser: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

WSL+Docker: Kubernetes on the Windows Desktop (21)

Finally to login, we can either enter a Token, which we didn't create, or enter the kubeconfig file from our Cluster.

If we try to login with the kubeconfig, we will get the error "Internal error (500): Not enough data to create auth info structure". This is due to the lack of credentials in the kubeconfig file.

So to avoid you ending with the same error, let's follow the recommended RBAC approach.

Let's open a new WSL2 session:

# Create a new ServiceAccountkubectl apply -f - <<EOFapiVersion: v1kind: ServiceAccountmetadata: name: admin-user namespace: kubernetes-dashboardEOF# Create a ClusterRoleBinding for the ServiceAccountkubectl apply -f - <<EOFapiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata: name: admin-userroleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-adminsubjects:- kind: ServiceAccount name: admin-user namespace: kubernetes-dashboardEOF

WSL+Docker: Kubernetes on the Windows Desktop (22)

# Get the Token for the ServiceAccountkubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print $1}')# Copy the token and copy it into the Dashboard login and press "Sign in"

WSL+Docker: Kubernetes on the Windows Desktop (23)

Success! And let's see our nodes listed also:

WSL+Docker: Kubernetes on the Windows Desktop (24)

A nice and shiny three nodes appear.

(Video) Kubernetes on Windows with WSL 2 and Microk8s

Right now, we have Docker that is installed, configured and the last test worked fine.

However, if we look carefully at the kubectl command, it found the "Client Version" (1.15.5), but it didn't find any server.

This is normal as we didn't enable the Docker Kubernetes cluster. So let's install Minikube and create our first cluster.

And as sources are always important to mention, we will follow (partially) the how-to from the Kubernetes.io website:

# Download the latest version of Minikubecurl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64# Make the binary executablechmod +x ./minikube# Move the binary to your executable pathsudo mv ./minikube /usr/local/bin/

WSL+Docker: Kubernetes on the Windows Desktop (25)

Minikube: updating the host

If we follow the how-to, it states that we should use the --driver=none flag in order to run Minikube directly on the host and Docker.

Unfortunately, we will get an error about "conntrack" being required to run Kubernetes v 1.18:

# Create a minikube one node clusterminikube start --driver=none

WSL+Docker: Kubernetes on the Windows Desktop (26)

Tip: as you can see, the Terminal was changed so the nice icons are all displayed

So let's fix the issue by installing the missing package:

# Install the conntrack packagesudo apt install -y conntrack

WSL+Docker: Kubernetes on the Windows Desktop (27)

Let's try to launch it again:

# Create a minikube one node clusterminikube start --driver=none# We got a permissions error > try again with sudosudo minikube start --driver=none

WSL+Docker: Kubernetes on the Windows Desktop (28)

Ok, this error cloud be problematic ... in the past. Luckily for us, there's a solution

Minikube: enabling SystemD

In order to enable SystemD on WSL2, we will apply the scripts from Daniel Llewellyn.

I invite you to read the full blog post and how he came to the solution, and the various iterations he did to fix several issues.

So in a nutshell, here are the commands:

# Install the needed packagessudo apt install -yqq daemonize dbus-user-session fontconfig

WSL+Docker: Kubernetes on the Windows Desktop (29)

# Create the start-systemd-namespace scriptsudo vi /usr/sbin/start-systemd-namespace#!/bin/bashSYSTEMD_PID=$(ps -ef | grep '/lib/systemd/systemd --system-unit=basic.target$' | grep -v unshare | awk '{print $2}')if [ -z "$SYSTEMD_PID" ] || [ "$SYSTEMD_PID" != "1" ]; then export PRE_NAMESPACE_PATH="$PATH" (set -o posix; set) | \ grep -v "^BASH" | \ grep -v "^DIRSTACK=" | \ grep -v "^EUID=" | \ grep -v "^GROUPS=" | \ grep -v "^HOME=" | \ grep -v "^HOSTNAME=" | \ grep -v "^HOSTTYPE=" | \ grep -v "^IFS='.*"$'\n'"'" | \ grep -v "^LANG=" | \ grep -v "^LOGNAME=" | \ grep -v "^MACHTYPE=" | \ grep -v "^NAME=" | \ grep -v "^OPTERR=" | \ grep -v "^OPTIND=" | \ grep -v "^OSTYPE=" | \ grep -v "^PIPESTATUS=" | \ grep -v "^POSIXLY_CORRECT=" | \ grep -v "^PPID=" | \ grep -v "^PS1=" | \ grep -v "^PS4=" | \ grep -v "^SHELL=" | \ grep -v "^SHELLOPTS=" | \ grep -v "^SHLVL=" | \ grep -v "^SYSTEMD_PID=" | \ grep -v "^UID=" | \ grep -v "^USER=" | \ grep -v "^_=" | \ cat - > "$HOME/.systemd-env" echo "PATH='$PATH'" >> "$HOME/.systemd-env" exec sudo /usr/sbin/enter-systemd-namespace "$BASH_EXECUTION_STRING"fiif [ -n "$PRE_NAMESPACE_PATH" ]; then export PATH="$PRE_NAMESPACE_PATH"fi
# Create the enter-systemd-namespacesudo vi /usr/sbin/enter-systemd-namespace#!/bin/bashif [ "$UID" != 0 ]; then echo "You need to run $0 through sudo" exit 1fiSYSTEMD_PID="$(ps -ef | grep '/lib/systemd/systemd --system-unit=basic.target$' | grep -v unshare | awk '{print $2}')"if [ -z "$SYSTEMD_PID" ]; then /usr/sbin/daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target while [ -z "$SYSTEMD_PID" ]; do SYSTEMD_PID="$(ps -ef | grep '/lib/systemd/systemd --system-unit=basic.target$' | grep -v unshare | awk '{print $2}')" donefiif [ -n "$SYSTEMD_PID" ] && [ "$SYSTEMD_PID" != "1" ]; then if [ -n "$1" ] && [ "$1" != "bash --login" ] && [ "$1" != "/bin/bash --login" ]; then exec /usr/bin/nsenter -t "$SYSTEMD_PID" -a \ /usr/bin/sudo -H -u "$SUDO_USER" \ /bin/bash -c 'set -a; source "$HOME/.systemd-env"; set +a; exec bash -c '"$(printf "%q" "$@")" else exec /usr/bin/nsenter -t "$SYSTEMD_PID" -a \ /bin/login -p -f "$SUDO_USER" \ $(/bin/cat "$HOME/.systemd-env" | grep -v "^PATH=") fi echo "Existential crisis"fi
# Edit the permissions of the enter-systemd-namespace scriptsudo chmod +x /usr/sbin/enter-systemd-namespace# Edit the bash.bashrc filesudo sed -i 2a"# Start or enter a PID namespace in WSL2\nsource /usr/sbin/start-systemd-namespace\n" /etc/bash.bashrc

WSL+Docker: Kubernetes on the Windows Desktop (30)

Finally, exit and launch a new session. You do not need to stop WSL2, a new session is enough:

WSL+Docker: Kubernetes on the Windows Desktop (31)

(Video) Kubernetes on Docker Desktop (Nginx Running on Pods)

Minikube: the first cluster

We are ready to create our first cluster:

# Check if the KUBECONFIG is not setecho $KUBECONFIG# Check if the .kube directory is created > if not, no need to create itls $HOME/.kube# Check if the .minikube directory is created > if yes, delete itls $HOME/.minikube# Create the cluster with sudosudo minikube start --driver=none

In order to be able to use kubectl with our user, and not sudo, Minikube recommends running the chown command:

# Change the owner of the .kube and .minikube directoriessudo chown -R $USER $HOME/.kube $HOME/.minikube# Check the access and if the cluster is runningkubectl cluster-info# Check the resources createdkubectl get all --all-namespaces

WSL+Docker: Kubernetes on the Windows Desktop (32)

The cluster has been successfully created, and Minikube used the WSL2 IP, which is great for several reasons, and one of them is that we can open the Kubernetes master URL in our Windows browser:

WSL+Docker: Kubernetes on the Windows Desktop (33)

And the real strength of WSL2 integration, the port 8443 once open on WSL2 distro, it actually forwards it to Windows, so instead of the need to remind the IP address, we can also reach the Kubernetes master URL via localhost:

WSL+Docker: Kubernetes on the Windows Desktop (34)

Minikube: can I see a nice dashboard?

Working on the command line is always good and very insightful. However, when dealing with Kubernetes we might want, at some point, to have a visual overview.

For that, Minikube embeded the Kubernetes Dashboard. Thanks to it, running and accessing the Dashboard is very simple:

# Enable the Dashboard servicesudo minikube dashboard# Access the Dashboard from a browser on Windows side

WSL+Docker: Kubernetes on the Windows Desktop (35)

The command creates also a proxy, which means that once we end the command, by pressing CTRL+C, the Dashboard will no more be accessible.

Still, if we look at the namespace kubernetes-dashboard, we will see that the service is still created:

# Get all the services from the dashboard namespacekubectl get all --namespace kubernetes-dashboard

WSL+Docker: Kubernetes on the Windows Desktop (36)

Let's edit the service and change it's type to LoadBalancer:

# Edit the Dashoard servicekubectl edit service/kubernetes-dashboard --namespace kubernetes-dashboard# Go to the very end and remove the last 2 linesstatus: loadBalancer: {}# Change the type from ClusterIO to LoadBalancer type: LoadBalancer# Save the file

WSL+Docker: Kubernetes on the Windows Desktop (37)

Check again the Dashboard service and let's access the Dashboard via the LoadBalancer:

# Get all the services from the dashboard namespacekubectl get all --namespace kubernetes-dashboard# Access the Dashboard from a browser on Windows side with the URL: localhost:<port exposed>

WSL+Docker: Kubernetes on the Windows Desktop (38)

It's clear that we are far from done as we could have some LoadBalancing implemented and/or other services (storage, ingress, registry, etc...).

Concerning Minikube on WSL2, as it needed to enable SystemD, we can consider it as an intermediate level to be implemented.

So with two solutions, what could be the "best for you"? Both bring their own advantages and inconveniences, so here an overview from our point of view solely:

CriteriaKinDMinikube
Installation on WSL2Very EasyMedium
Multi-nodeYesNo
PluginsManual installYes
PersistenceYes, however not designed forYes
AlternativesK3dMicrok8s

We hope you could have a real taste of the integration between the different components: WSL2 - Docker Desktop - KinD/Minikube. And that gave you some ideas or, even better, some answers to your Kubernetes workflows with KinD and/or Minikube on Windows and WSL2.

See you soon for other adventures in the Kubernetes ocean.

Nuno & Ihor

(Video) Detailed Windows Terminal, (WSL 2), Linux, Docker, and Kubernetes Install Guide on Windows 10.

  • ←Previous
  • Next→

FAQs

Can I run Kubernetes on WSL? ›

You can run Kubernetes in WSL 2. If your Windows version supports it, you can use Hyper-V to create a virtual machine or. You can create a virtual machine using VirtualBox.

Can I run Kubernetes locally on Windows? ›

Like kind , minikube is a tool that lets you run Kubernetes locally. minikube runs an all-in-one or a multi-node local Kubernetes cluster on your personal computer (including Windows, macOS and Linux PCs) so that you can try out Kubernetes, or for daily development work.

Can I use Docker Desktop for Kubernetes? ›

Docker Desktop includes a standalone Kubernetes server and client, as well as Docker CLI integration that runs on your machine. The Kubernetes server runs locally within your Docker instance, is not configurable, and is a single-node cluster.

How to run Kubernetes on Docker for Windows? ›

Getting Started with Kubernetes on Docker Desktop
  1. Install Docker Desktop. Docker Desktop is freely available in a community edition, for Windows and Mac. ...
  2. Enable Kubernetes. ...
  3. Verify your Kubernetes cluster. ...
  4. Run a familiar application. ...
  5. Check the app components. ...
  6. Use the app. ...
  7. Check the resilience. ...
  8. Teardown your environment.

What are the disadvantages of WSL? ›

Cons of Using WSL
  • WSL Could Discourage Desktop Linux Adoption. ...
  • Remote Possibility of Microsoft Dominating Linux. ...
  • WSL Could Discourage Native App Development. ...
  • You're Still Using Windows. ...
  • WSL Is Not Really Designed for Servers.
Jan 21, 2022

Is WSL faster than VM? ›

Windows Subsystem for Linux

While WSL 2 actually uses the Linux kernel running under Hyper-V, you won't have as much of a performance hit than with a VM because you aren't running most of the other processes that run on a Linux system. You can run WSL with less memory than you would need for a virtual machine.

How much RAM do I need for Kubernetes? ›

A minimum Kubernetes master node configuration is: 4 CPU cores (Intel VT-capable CPU) 16GB RAM.

What is the biggest disadvantage of Kubernetes? ›

Scaling. Every organization aims to increase the scope of its operations over time. However, if their infrastructure is poorly equipped to scale, it's a major disadvantage. Since Kubernetes microservices are complex and generate a lot of data to deploy, diagnosing and fixing any type of problem is daunting task.

Which platform is best for Kubernetes? ›

Top Kubernetes Management Platforms
  • Canonical Kubernetes (Ubuntu)
  • Mirantis Docker Enterprise.
  • Platform9.
  • Portainer.
  • Red Hat.
  • SUSE Rancher.
  • VMware Tanzu.
  • Comparison Chart.
Jan 15, 2021

Is Kubernetes killing Docker? ›

There is a widespread panic all over the internet lately with regards to the last move of Kubernetes to shun Docker from its platform.

Is Docker desktop no longer free? ›

Docker Desktop may be used for free as part of a Docker Personal subscription for: Small companies (less than 250 employees AND less than $10 million in annual revenue) Personal use. Education and learning (as a student or instructor, either in an academic or professional environment)

Why is K8s Docker deprecated? ›

Because this “adapter” is sandwiched between the kubelet and Docker, it is vividly called a “shim”, which means “shim”. With CRI and shim, although K8s still uses Docker as the underlying runtime, it also has the conditions for decoupling from Docker, which has opened the curtain of the “deprecating Docker” drama.

Is Kubernetes easier than Docker? ›

If you have few workloads running, don't mind managing your own infrastructure, or don't need a specific feature Kubernetes offers, then Docker Swarm may be a great choice. Kubernetes is more complex to set up in the beginning but offers greater flexibility and features.

Why is WSL needed for Docker? ›

Docker Desktop for Windows provides a development environment for building, shipping, and running dockerized apps. By enabling the WSL 2 based engine, you can run both Linux and Windows containers in Docker Desktop on the same machine.

Is there a Docker container for Windows? ›

The Microsoft container ecosystem

Run Windows-based or Linux-based containers on Windows 10 for development and testing using Docker Desktop, which makes use of containers functionality built-in to Windows. You can also run containers natively on Windows Server.

Does WSL make your PC slow? ›

File performance across the Windows and Linux operating systems is faster in WSL 1 than WSL 2, so if you are using Windows applications to access Linux files, you will currently achieve faster performance with WSL 1.

Do developers use WSL? ›

WSL especially helps web developers and those working with Bash and Linux-first tools (for example, Ruby and Python) to use their tools on Windows and ensure consistency between development and production environments.

Is WSL better than dual boot? ›

WSL vs Dual Booting

Dual Booting means installing multiple operating systems on a single computer, and being able to choose which one to boot. This means that you CANNOT run both the OS at the same time. But if you use WSL, you can use both the OS simultaneously without the need to switch the OS.

Does WSL consume RAM? ›

On machines running build 20175 or higher, RAM is limited to either 50% of your total memory or 8GB, whichever happens to be smaller. On builds older than 20175, WSL could consume up to 80% of your host RAM.

Why use WSL instead of Windows? ›

WSL requires fewer resources (CPU, memory, and storage) than a full virtual machine. WSL also allows you to run Linux command-line tools and apps alongside your Windows command-line, desktop and store apps, and to access your Windows files from within Linux.

Should I use WSL or Windows? ›

When working with JavaScript-based frameworks in a professional capacity, we recommend WSL as it currently supports better performance speed, system call compatibility, and alignment between your local development environment and deployment environment (which is often a Linux server).

Is Kubernetes worth learning 2022? ›

You need to learn Kubernetes if it is related to your work in any way, whether it's creating containerized applications, managing and deploying, or maintaining a containerized environment. If you are a practitioner, there is a high likelihood that you will encounter K8s in some form or another.

Should I run Kubernetes locally? ›

Setting up a local Kubernetes environment as your development environment is the recommended option, no matter your situation, because this setup can create a safe and agile application-deployment process.

How many months it takes to learn Kubernetes? ›

Estimated time to complete

It will take you approximately 13 hours to complete this entire learning path.

Is there anything better than Kubernetes? ›

ECS is a great choice as one of the alternatives to Kubernetes for container orchestration. You can choose to run containers on Fargate or EC2 instances. ECS with Fargate or Spot EC2 instances can help save up to 90% on billing. ECS has SLA, which guarantees a Monthly Uptime of at least 99.99%.

What will replace Kubernetes? ›

Kubernetes Alternatives: Container as a Service (CaaS)
  • AWS Fargate. ...
  • Azure Container Instances. ...
  • Google Cloud Run. ...
  • Google Kubernetes Engine (GKE) ...
  • Amazon Elastic Kubernetes Service (EKS) ...
  • Openshift Container Platform. ...
  • Rancher. ...
  • Docker Swarm.

Why is Kubernetes so hard? ›

Kubernetes manages containers, but it's difficult for developers to understand the moving parts in a large enterprise container environment. Having many more moving parts also introduces a larger attack surface.

What is Kubernetes replacing Docker with? ›

Kubernetes is removing support for Docker as a container runtime. Kubernetes does not actually handle the process of running containers on a machine. Instead, it relies on another piece of software called a container runtime.

Can we practice Kubernetes on Windows 10? ›

Its main advantage is that it allows users to schedule and run Linux containers in physical or VM clusters. Although it is primarily a Linux technology, running Kubernetes on Windows is possible. This tutorial will show you how to run Kubernetes on Windows.

Can I run Kubernetes on my laptop? ›

The great thing about Kubernetes is that you can take it anywhere. If just want to familiarize yourself with Kubernetes and do some testing, then Minikube is an easy to install nonproduction single node Kubernetes cluster that you can install on your laptop.

Is Docker still relevant 2022? ›

Is Docker Still Relevant In 2022? Docker remains relevant to most container projects, applications, and developers today thanks to its modern tools, compatibility, large community, and ease of use. However, Docker Inc has undergone changes recently, among them changes to Docker Desktop licensing.

Is there anything better than Docker? ›

1. Podman. Podman, a container engine developed by RedHat, is one of the most prominent Docker alternatives for building, running, and storing container images. Podman maintains compatibility with the OCI container image spec just like Docker, meaning Podman can run container images produced by Docker and vice versa.

Does Kubernetes have a future? ›

The platform may become irrelevant, but the doors that the platform opened up for us won't be. The key takeaway for Kubernetes in the future will be that Custom Resource Definitions (CRD) and extending the API will be “the future” of orchestration platforms.

Why Docker is shutting down? ›

The process inside the container has been terminated: This is when the program that runs inside the container is given a signal to shut down. This happens if you run a foreground container (using docker run ), and then press Ctrl+C when the program is running.

Is Docker on the decline? ›

Today, Docker is still alive, but it is a fraction of the company it might have become, having never succeeded in turning this technological innovation into a sustainable business model, eventually leading to the sale of its enterprise business to Mirantis in November 2019.

What is Docker not good for? ›

Docker does not suit applications that require rich UI. Docker is mainly intended for isolated containers with console-based applications. GUI-based applications are not a priority, their support will rely on the specific case and application.

Is Kubernetes still in demand? ›

There will be white-hot demand for Kubernetes skills – and cloud-native capabilities in general – for the foreseeable future. And that demand is almost certainly going to outpace supply again in 2022.

Is Kubernetes an overkill? ›

Disadvantages of Using Kubernetes

Overkill for small applications: If your applications are too small, such as a landing page with a store's location and hours, Kubernetes can be overkill, as it brings unneeded technical complexity.

Can Kubernetes run without Docker? ›

You can decide to use Kubernetes without Docker, or even Docker without Kubernetes for that matter (but we advise you to use it for different purposes than running containers). Still, even though Kubernetes is a rather extensive tool, you will have to find a good container runtime for it – one that has implemented CRI.

What should I learn first Kubernetes or Docker? ›

When it comes to learning Docker or Kubernetes first and you ask yourself do I need to learn Docker before Kubernetes? The answer is that you should instead learn about containerization engines.

Is Kubernetes enough to get a job? ›

DevOps Kubernetes jobs can actually be a great way to kickstart your career. As a DevOps engineer, you shall be responsible for the management and deployment of software changes using Kubernetes.

What is the fastest way to learn Kubernetes? ›

  1. Learn Kubernetes Basics.
  2. Configuration.
  3. Security. Apply Pod Security Standards at the Cluster Level. Apply Pod Security Standards at the Namespace Level. Restrict a Container's Access to Resources with AppArmor. Restrict a Container's Syscalls with seccomp.
Oct 2, 2022

Can I run Docker in WSL without Docker desktop? ›

Since we're installing Docker directly inside of WSL 2 you won't need Docker Desktop installed to make this work. If you previously had Docker Desktop installed you may also want to delete a few symlinks that Docker adds to WSL 2.

Is WSL better than Linux? ›

Running a Full Linux Distro Can Be Better Than WSL

While WSL is a fine product, there are still situations where running a full Linux distro on the desktop can be better. If you're on the fence about whether to stick to Linux or go back to the Windows desktop, read on for a pretty compelling case for the latter.

Do you need WSL for Docker desktop? ›

If you're running Windows Home, WSL 2 is the only way to run Docker Desktop. On Windows Pro, you can also use Hyper-V, but that is deprecated now, so WSL 2 is the way to go in all cases.

Is Docker for Windows the same as Docker Desktop? ›

Docker Desktop for Windows is a product meant for running both Linux and Windows containers on Windows. It's not meant for a production environment, and instead is meant for a desktop/client SKU of Windows, hence the Windows 10 requirement. So you could think of this as Docker for Windows 10.

Can I run Docker for Windows without Desktop? ›

You are able to run docker in WSL without Docker Desktop.

Can I run Windows container on Windows? ›

Run a Windows container using Windows Admin Center

First, open the container host you want to manage, and in the Tools pane, select the Containers extension. Then, select the Images tab inside the Container extension under Container Host. In the Pull Container Image settings, provide the image URL and the tag.

How do I use Kubernetes in WSL2? ›

Accessing a Kubernetes Service running in WSL2
  1. prepare cluster config with exported node port. ...
  2. create cluster kind create cluster --config=cluster-config.yml.
  3. create deployment kubectl create deployment nginx --image=nginx --port=80.
  4. create service kubectl create service nodeport nginx --tcp=80:80 --node-port=30000.
Oct 19, 2022

How do you use Kubectl on WSL? ›

Install kubectl on Windows 10 using WSL
  1. Update your Windows 10 that build version would be 16215 or later.
  2. Enable WSL Windows 10 feature using Powershell.
  3. Install Ubuntu distribution.
  4. Install Visual Studio Code.
  5. Connect remotely from Visual Studio to Ubuntu.
  6. Install and configure kubectl tool.
Mar 1, 2020

Can I run Kubernetes on Ubuntu? ›

Prerequisites. You will need to provision two servers, running on Ubuntu 20.04. For best performance, the minimum system requirements for Kubernetes are 2GB of RAM and 2 CPUs. You may follow steps 1 to 4 of this step-by-step tutorial to help you set up your Ubuntu server on CloudSigma.

Can Kubernetes run on any OS? ›

Kubernetes is itself an application (or set of applications), and these applications have to run somewhere. Despite what you may have heard, Kubernetes is not an operating system, but still depends on Linux (or Windows) to be installed on the nodes.

How do I run Kubernetes on Windows 11? ›

Installing Kubernetes on Windows
  1. Step 1: Enable Hyper-V. Hyper-V is Microsoft's hardware virtualization product that allows the creation of virtual machines in their own isolated space. ...
  2. Step 2: Install Docker for Windows. ...
  3. Step 3: Install Kubernetes. ...
  4. Step 4: Install Kubernetes Dashboard.
Jun 23, 2022

Can WSL2 run Windows containers? ›

By enabling the WSL 2 based engine, you can run both Linux and Windows containers in Docker Desktop on the same machine.

Can I run GUI in WSL2? ›

Windows Subsystem for Linux (WSL) now supports running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience. WSL 2 enables Linux GUI applications to feel native and natural to use on Windows.

Does kubectl work on Windows? ›

To install kubectl on Windows you can use either Chocolatey package manager, Scoop command-line installer, or winget package manager.

Is WSL a VM or container? ›

WSL 2 is running as a hyper-v virtual machine.

How do I create a Kubernetes cluster in WSL? ›

Setup Local Kubernetes Cluster with Docker, WSL2 and KinD
  1. KinD Pre-Requisites. Here is the list of the prerequisites needed and their version/lane: ...
  2. Setup WSL2. ...
  3. Install Linux Distro. ...
  4. Setting up Docker Desktop in WSL2. ...
  5. Setup KinD on Linux Distro. ...
  6. Spin a KinD Kubernetes Cluster. ...
  7. Running Multi-node cluster with KinD.
Mar 19, 2021

Is Docker better on Windows or Linux? ›

Use Linux for Containers, it is always the best option. Windows 7 or Windows 10 Home doesn't support Docker, you need to use Docker Toolbox which is not great. There is no support for Windows containers in most cloud providers or Kubernetes.

Should I use Kubernetes or Docker? ›

If you have few workloads running, don't mind managing your own infrastructure, or don't need a specific feature Kubernetes offers, then Docker Swarm may be a great choice. Kubernetes is more complex to set up in the beginning but offers greater flexibility and features.

Videos

1. Install Docker in WSL 2 without Docker Desktop
(Nick Janetakis)
2. How to install Docker, Kubernetes, Kubernetes Dashboard UI
(Shailesh Jha)
3. WSL 2 with Docker getting started
(David Bombal)
4. Installing and Configuring Docker Desktop on Windows (Docker and Kubernetes setup)
(Pablo's Spot)
5. Setup Kubernetes on your computer with Docker Desktop #dockerdesktop #kubernetes #vscode
(Naved Rizvi)
6. kubeAcademy Building Applications for Kubernetes: Docker Desktop Installation for Windows 10
(vmexplorer)
Top Articles
Latest Posts
Article information

Author: Aron Pacocha

Last Updated: 06/03/2023

Views: 5854

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.