Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

04. Deploying into local Kubernetes in Windows 10 and Docker for Windows development environment

Cesar De la Torre edited this page Apr 20, 2018 · 12 revisions

Setting up Kubernetes in Docker for Windows

As of mid-April 2018, using a Preview version of Windows 10 () and Docker for Windows Edge channel, the steps to set up Kuberentes in Docker for Windows are the following:

  1. If you are in "Windows containers mode" in "Docker for Windows", switch to "Linux containers mode" in Docker for Windows. This step is only needed in the Preview in order to enable Kubernetes. In the final version with Kubernetes support for Windows Containers, this step might not be required.

image

  1. Hit the "Settings" menu option and within the Settings UI window, go to the Kubernetes tab and enable Kubernetes. The Kubernetes cluster will be installed as shown in the following screenshot.

image

After the process is done, you should get a success message like the following:

image

  1. Now, switch to Windows Containers:

image

  1. Check Kubernetes state.

At this point you should be in "Windows Containers mode" plus you should have a local Kubernetes cluster installed.

You can check that out by looking at the Settings window where you should see a message saying "Kubernetes is running":

image

Now, you can check that the Kubernetes cluster is working by typing either from PowerShell or CMD:

image

Deploy the ASP.NET MVC app (eShopModernizedMVC) to the local Kubernetes cluster

Using PowerShell or CMD, position into the folder with the .yml files for Kubernetes "Kubernetes-DockerForWindows" and run the following kubectl create command specifying the YAML manifest (in Kubernetes native format):

kubectl create -f eshop-modernized-mvc-k8s-services-deployment.yml

image

Wait for a few minutes until the deployments are ready.

You can check out the deployment's state by running:

kubectl get deployments

image

If the attibute "AVAILABLE" is "0", the deployment is still not ready. Wait until it is "1", like in the following screenshot:

======================== TBD ==========================

Clone this wiki locally