How to install Kubernetes in Windows 10

 

Step 1 - Install and setup Hyper-V

Goto- Control Panel\All Control Panel Items\Programs and Features

Click Turn Windows features on or off then select all the components came  under Hyper-V


It may require a reboot machine.


After installing this feature open PowerShell then run as administrator and hit below command.

Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V


Output will look like the screenshot below.


Step2 - Now install docker for Windows. You can download it from the link below.

https://hub.docker.com/editions/community/docker-ce-desktop-windows


Step3 - After installing docker right click on docker tray and goto settings from the left side click on Kubernetes and start it .Here it will take a few minutes to complete installation process along with dependencies. If everything goes well then you will see below screen.




Step4 - Now install Kubernetes dashboard so that you can manage k8 resources through GUI.

For doing this follow the below steps.

  • Download configurationYaml file

https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc7/aio/deploy/recommended.yaml


  •  After downloading deploy this file and verify with the following commands

Deploying- kubectl apply -f .\recommended.yaml

Verifying- kubectl.exe get -f .\recommended.yaml.txt


Now access kubernetes by dashboard so there are 2 ways to access it one is through a token and second is by creating users and assigning all the required permissions. Let's generates token so first run below command.


((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1]


Copy this token and run command- kubectl proxy


Open below link from the browser.

http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/


You will get below screen then select Token option and enter copied token here then click on sign in.


BOOM…….:)

Finally You have done this setup after very hard work



Comments

Popular posts from this blog

Core 5 Security Epics in AWS Cloud

How to change Domain account logging password

Why do you need to monitor your network?