SlideShare a Scribd company logo
Install a MicroK8s single node cluster locally on
Windows 10
By Philippe Beraud, Microsoft France
This walkthrough guides you through all the steps required to create and configure a MicroK8s
cluster on Windows 10.
Kubernetes1
runs on Linux. As such, MicroK8s2
provides a single command installation of the latest
Kubernetes release on a Linux machine for development and testing. MicroK8s is easy to install and
use on Ubuntu or any other Linux distro which supports snaps, i.e. pre-packaged applications (similar
to Docker containers).
Although Windows 10 now has some very useful features, such as the ability to install Ubuntu as an
app, the integration of Windows Subsystem for Linux 2 (WSL2) doesn’t provide (yet) all the Ubuntu
functionalities required to make MicroK8s run smoothly right out-of-the-box (OOB) and thus use the
snap daemon. If you wish to experiment with running MicroK8s semi-natively, see:
• Discourse post Using snapd in WSL2
• Post Running Snaps on WSL2 (Insiders only for now) along with the short YouTube video Use
this ONE trick to run Linux Snap packages in Windows Subsystem for Linux 2 (WSL2)
For now, and for the sake of simplicity for anyone looking to try out Kubernetes on Windows 10, let’s
run MicroK8s on Windows 10 with virtualization. MicroK8s will install without problems on Ubuntu on
a virtual machine (VM). The Canonical way to get a Linux VM on Windows 10 and to run MicroK8s in it
is with multipass.
Multipass gives you an easy to use interface to manage VMs on Windows 10 – Same is true on MacOS
and Linux -. On Windows platforms, multipass defaults to using Microsoft Hyper-V as it’s virtualization
provider. So, Microsoft Hyper-V is a prerequisite. (You can also take advantage of a local installation of
VirtualBox if you want to.)
Note For more information, see Instant Ubuntu VMs.
Enabling Hyper-V
The Windows 10 Hyper-V System requires:
• Windows 10 Enterprise, Pro, or Education
• 64-bit Processor with Second Level Address Translation (SLAT).
• CPU support for VM Monitor Mode Extension (VT-c on Intel CPUs).
• Minimum of 4 GB memory.
Note For more information and troubleshooting, see Windows 10 Hyper-V System Requirements.
Perform the following steps:
1. Open a PowerShell console as an Administrator.
1
https://kubernetes.io/
2
https://github.com/ubuntu/microk8s
2. Check if virtualization is supported:
PS C:> systeminfo
If you see the following output, virtualization is supported. You can proceed with the next
steps.
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Virtualization Enabled In Firmware: Yes
Second Level Address Translation: Yes
Data Execution Prevention Available: Yes
If you see the following output, your system already has a Hypervisor installed and you can
skip the next steps below.
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V
will not be displayed.
Otherwise, virtualization is unfortunately not supported on your machine, and you can not
continue with this walkthrough.
3. Run the following command:
PS C:> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Note If the command couldn't be found, make sure you're running PowerShell as Administrator.
4. Once the installation has completed, reboot your Windows 10 machine.
Creating the Ubuntu 18.04 LTS VM
Perform the following steps:
1. Download and install multipass. The latest Windows 10 installer is available for download here
on the multipass GitHub releases page.
2. Once multipass is installed, you can now create a VM to run MicroK8s. At least 4 Gb of RAM
and 40 Gb of storage is recommended – you can pass these requirements when you launch
the VM –
a. Open a PowerShell console.
b. Creates a new Ubuntu VM instance using the default, at this point in time, image:
PS C:> multipass launch --name microk8s-vm --mem 4G --disk 40G
It’s most likely going to be the latest cloud image of the newest Ubuntu LTS (Long
Term Support) release, at the time of this writing a 18.04 LTS release.
Note You can also choose another image, you can use the find command to see what’s available.
Note For a complete listing of the available commands and their options in multipass, see the
Command-line reference.
When the command completes, a new VM named microk8s-vm is running. You can
see it from the Hyper-V Manager.
One should note that multipass uses the “Default Switch” network interface on Hyper-V, that,
in turn, uses the “Internet Sharing” functionality, providing DHCP (IP addresses) and DNS
(domain name resolution) to the instances.
3. Find the IP address which has been allocated to the VM:
PS C:> multipass list
Name State IPv4 Image
microk8s-vm Running 172.22.82.139 Ubuntu 18.04 LTS
Take a note of this IP as services will become available there when accessed from the Windows
10 host machine, see below. For example ,172.22.82.139 in our configuration.
4. To work within the VM environment more easily, get a shell inside the VM:
C:> multipass shell microk8s-vm
This opens up a new Shell window:
From within the VM shell, you can now follow along the rest of the quick start instructions for installing
MicroK8s on multipass.
Installing the MicroK8s cluster
Perform the following steps:
1. Install the latest version of the MicroK8s snap:
$ sudo snap install microk8s --classic
Note Microk8s is a snap deploying Kubernetes. The MicroK8s snap closely follows upstream
Kubernetes, so understanding a bit about the Kubernetes release cycle is helpful for more insight into
MicroK8s releases. Upstream Kubernetes ships a new release series (e.g. 1.16.x) approximately every three
months. For more information, see Snap channel overview.
That’s all it takes for the installation, which is quick and painless! ;-)
2. MicroK8s has a built-in command to display its status (see hereafter). During installation you
can use the --wait-ready flag to wait for the Kubernetes services to initialize. Check the
status:
$ sudo microk8s.status --wait-ready
The microk8s-vm VM now runs a MicroK8s cluster on to of Ubuntu 18.04 LTS.
MicroK8s comes with a set of tools: microk8s.start, microk8s.stop, microk8s.inspect,
microk8s.status, microk8s.enable, microk8s.disable, microk8s.kubectl,
microk8s.istioctl, and microk8s.config:
• microk8s.start and microk8s.stop do what you would expect: start or stop your
Kubernetes cluster.
• microk8s.inspect gives you see the actual Kubernetes cluster status.
• microk8s.status is a little less intuitive, as it shows the status of the add-ons and
not the Kubernetes cluster status. You will use it alongside microk8s.enable and
microk8s.disable to control add-ons.
• microk8s.kubectl is a wrapper around kubectl, i.e. the cluster manager tool for
Kubernetes.
• microk8s.istioctl is used to control Istio, which can be enabled as an add-on via
microk8s.enable istio.
• microk8s.config, shows the client configuration that can be used to connect to your
Kubernetes cluster, should you decide not to use microk8s.kubectl to do that. This
command will result in output like the following:
apiVersion: v1
clusters:
- cluster:
server: https://172.17.18.79:16443
name: microk8s-cluster
contexts:
- context:
cluster: microk8s-cluster
user: admin
name: microk8s
current-context: microk8s
kind: Config
preferences: {}
users:
- name: admin
user:
username: admin
password: UFpWSGlHZDJuSkxpcCtJZ0JTU1dDK2d0eWk3NTdhZEg0TjVQcWVDc3Ywdz0K
To feed this client config to microk8s.kubectl, you can for example write it to
~/.kube/config, i.e. the default configuration location.
$ sudo microk8s.config > $HOME/.kube/config
3. Configure the network:
$ sudo iptables -P FORWARD ACCEPT
4. MicroK8s creates a group to enable seamless usage of commands which require admin
privilege. Add your current user to the group:
$ sudo usermod -a -G microk8s ubuntu
You will also need to re-enter the session for the group update to take place.
5. As mentioned above, MicroK8s bundles its own version of kubectl for accessing Kubernetes.
Use it to run commands to monitor and control your Kubernetes. For example, view your
node:
$ microk8s.kubectl get nodes
NAME STATUS ROLES AGE VERSION
microk8s-vm Ready <none> 5m27s v1.17.0
6. Or alternatively see the running services:
$ microk8s.kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.152.183.1 <none> 443/TCP 6m17s
7. MicroK8s uses a namespaced kubectl command to prevent conflicts with any existing installs
of the Kubernetes command-line tool, kubectl. kubectl allows you to run commands against
Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster
resources, and view logs. See Overview of kubectl.
If you don't have an existing install, it is easier to add an alias (append to ~/.bash_aliases) like
this:
$ sudo snap alias microk8s.kubectl kubectl
Added:
- microk8s.kubectl as kubectl
Otherwise, from the Bash terminal console, to install the latest version of kubectl, run the
following command:
$ snap install kubectl –classic
$ kubectl version
See Install kubectl on Linux.
At this stage, you have a fully functional Kubernetes cluster.
Creating a test deployment on the MicroK8s cluster
Kubernetes is meant for deploying apps and services. You now can use the kubectl (alias) command
(or the microk8s.kubectl command) to do that as with any Kubernetes.
To install a first app, perform the following steps:
1. From the VM Shell, deploy NGINX with 3 replicas (instances) available:
$ kubectl run nginx --image nginx:alpine --replicas 3
2. It may take a minute or two to install, but you can check the status. Once NGINX has been
deployed, expose the application:
$ kubectl expose deployment nginx --port 80 --target-port 80 --type ClusterIP --
selector=run=nginx --name nginx
3. See the new Service and ClusterIP address assigned:
$ kubectl get svc
You now have a deployed an application to a fully functional Kubernetes cluster using Microk8s
Further configuring the MicroK8s cluster
MicroK8s uses the minimum of components for a pure, lightweight Kubernetes. However, plenty of
extra features are available thanks to "add-ons", i.e. pre-packaged components that provide extra
capabilities.
To turn on standards services, perform the following steps:
1. From the VM Shell, deploy a series addons:
$ sudo microk8s.enable dns dashboard registry
This will deploy:
• DNS (dns). This addon may be required by others, thus we recommend you always
enable it.
• Kubernetes dashboard (dashboard) as well as Grafana and influxDB.
• A docker private registry (registry) and expose it on localhost:32000. The storage
addon (storage) will be enabled as part of this addon.
Note Similarly, microk8s.disable turns off a service. Try microk8s.enable --help for a list of available
services built in. For more information, see MicroK8s Addons.
2. Check the deployment progress of your addons:
$ kubectl get all --all-namespaces
3. Let’s now access the Kubernetes dashboard. As you can see above, the kubernetes-dashboard
service in the kube-system namespace has an internal ClusterIP of 10.152.183.231 and
listens on TCP port 443.
a. Set up a proxy to pass and allow external requests to the dashboard:
$ sudo kubectl proxy --accept-hosts=.* --address=0.0.0.0 &
Note that the & at the end of this command string will run the command in the
background.
b. You now should be able to access the Kubernetes dashboard by entering the
following URL:
http://<IP_address>:8001/api/v1/namespaces/kube-system/services/https:kubernetes-
dashboard:/proxy/
Since you are running a MicroK8s cluster in a VM, <IP_address> should be the IP
address of the microk8s-vm VM so that the Kubernetes dashboard can be accessed
from your local Windows 10 machine. For example, 172.22.82.139 in our configuration.
http://172.22.82.139:8001/api/v1/namespaces/kube-system/services/https:kubernetes-
dashboard:/proxy/
From your Windows 10 host machine, open a browser session and navigate to the
above URL and you will see the Kubernetes dashboard UI.
c. At this point, the Kubernetes dashboard requires a token for gaining access. Create a
list of all the service names, with their secret name attached:
$ sudo kubectl -n kube-system get secret
d. Retrieve the secret token for the Kubernetes dashboard:
Important note Make sure to modify the 8bt92 entry to match the secret key associated with the
Kubernetes dashboard instance for your MicroK8s installation.
$ sudo kubectl -n kube-system describe secret kubernetes-dashboard-token-8bt92
Name: kubernetes-dashboard-token-8bt92
Namespace: kube-system
Labels: <none>
Annotations: kubernetes.io/service-account.name: kubernetes-dashboard
kubernetes.io/service-account.uid: fcafb527-b246-4a39-8a9e-8e8d7c6c5225
Type: kubernetes.io/service-account-token
Data
====
ca.crt: 1103 bytes
namespace: 11 bytes
token:
eyJhbGciOiJSUzI1NiIsImtpZCI6Im9YZlF6c0pzNjlESmRUYXkzSlp3cjVYZkpwZDlidmNIUGdITG5CWUt5REUifQ.
eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1
lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdW
Jlcm5ldGVzLWRhc2hib2FyZC10b2tlbi04YnQ5MiIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZ
S1hY2NvdW50Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQv
c2VydmljZS1hY2NvdW50LnVpZCI6ImZjYWZiNTI3LWIyNDYtNGEzOS04YTllLThlOGQ3YzZjNTIyNSIsInN1YiI6InN
5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlLXN5c3RlbTprdWJlcm5ldGVzLWRhc2hib2FyZCJ9.iYtoRdb4Qq9c4JL1n
SlFec631agfa-iV69shGoYhOWsBJCSuYCEal5Z5QxBC1lmuMp8fA-
vlXqm4vGboPIRHcrBZMHjzuNzWi0AsOdWQNWMqjoOsPA4NEYYsHN8embQBo5n3GNBYEMXNcTmZ5YY7qblHfzzZnje2S
S33ETQI_NuO4-cGVWk1mydUtnGhQkOLsYiDmkJKYt5CUIsgbTZvkynUmFHUZmjMSIAz1K2gdU1MqhGI2-
n9BpmdWQWHlpWH27_yTmvCivYznX6KPIsjG6jHHv4PFyw3PEFIXhkuOPL2MTwuKCx8Bcw7cEYSPd0uay8zVpvcipdeC
JORKUxTfw
The above command displays a long string of characters after token :. Copy that
string and then go back to your browser session.
e. In the above Kubernetes Dashboard dialog, select Token and then paste the copied
token into the Enter token* text field. Click Sign in and the Kubernetes dashboard
should open up.
Alternatively, you can allow accessing the Kubernetes dashboard without requiring such a
token. To do so:
a. Edit the deployment file for the dashboard service:
$ sudo kubectl -n kube-system edit deploy kubernetes-dashboard -o yaml
b. Add the –enable-skip-login flag to the deployment’s specs. Scroll down to the line
after - --namespace=kube-system, press i, type “- --enable-skip-login”, press ESC,
and then type “:w”.
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: kubernetes-dashboard
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
k8s-app: kubernetes-dashboard
spec:
containers:
- args:
- --auto-generate-certificates
- --namespace=kube-system
- --enable-skip-login
c. Type “:x” to exit the vim editor.
d. Navigate to the previous URL:
http://172.22.82.139:8001/api/v1/namespaces/kube-system/services/https:kubernetes-
dashboard:/proxy/
e. Click Skip. Et voilà!
4. Let’s now access the Grafana dashboard instead. The API server proxies your services. Get to
them:
$ kubectl cluster-info
Kubernetes master is running at https://127.0.0.1:16443
Heapster is running at https://127.0.0.1:16443/api/v1/namespaces/kube-
system/services/heapster/proxy
CoreDNS is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/kube-
dns:dns/proxy
Grafana is running at https://127.0.0.1:16443/api/v1/namespaces/kube-
system/services/monitoring-grafana/proxy
InfluxDB is running at https://127.0.0.1:16443/api/v1/namespaces/kube-
system/services/monitoring-influxdb:http/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Grafana is running at https://127.0.0.1:16443/api/v1/namespaces/kube-
system/services/monitoring-grafana/proxy/.
5. Open a browser on your Windows 10 host machine and navigate to the following URL:
http://<IP_address>:8001/api/v1/namespaces/kube-system/services/https:kubernetes-
dashboard:/proxy/
As before, since you are running a MicroK8s cluster in a VM, <IP_address> should be
the IP address of the microk8s-vm VM so that the Kubernetes dashboard can be
accessed from your local Windows 10 machine. For example, 172.22.82.139 in our
configuration.
http://172.22.82.139:8001/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
The Grafana dashboard should open up.
So, let’s remove the service and pods you have previously deployed:
$ kubectl delete service nginx
service "nginx" deleted
$ kubectl delete deployment nginx
deployment.apps "nginx" deleted
At this stage, your MicroK8s cluster will continue running until you decide to stop it. You can stop
MicroK8s with this simple command:
$ microk8s.stop
You can start again any time by running:
$ microk8s.start
This concludes this walkthrough. You can now start using your MicroK8s single node cluster the
way you expect on your Windows 10 machine. This is great for technical ram-up on Kubernetes,
local development, and CI/CD.
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)

More Related Content

PPTX
Cloud Computing
PDF
Introduction to Docker Compose | Docker Intermediate Workshop
PPTX
AWS VPC & Networking basic concepts
PDF
Automatically Renew Certificated In Your Kubernetes Cluster
PPTX
AWS Simple Storage Service (s3)
PDF
Az 104 session 6 azure networking part2
PPTX
Introduction to GCP (Google Cloud Platform)
PDF
Introduction to Cloud Computing
Cloud Computing
Introduction to Docker Compose | Docker Intermediate Workshop
AWS VPC & Networking basic concepts
Automatically Renew Certificated In Your Kubernetes Cluster
AWS Simple Storage Service (s3)
Az 104 session 6 azure networking part2
Introduction to GCP (Google Cloud Platform)
Introduction to Cloud Computing

What's hot (20)

PPT
Cloud computing-security-issues
PDF
Understanding Azure AD
PPTX
Azure Key Vault - Getting Started
PPTX
Introduction to Cloud Computing and AWS
PDF
Evolution of Cloud Computing
PDF
Microsoft Azure Overview
PPTX
Azure Identity and access management
PDF
Azure governance v4.0
PPTX
PDF
Terraform -- Infrastructure as Code
PPTX
Presentation cloud computing
PPTX
Cloud computing ppt
PDF
The Layman's Guide to Microsoft Azure
PDF
AWS VPC.pdf
PDF
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
PPTX
Wi-FI Hacking
PDF
Cloud Security: A New Perspective
PPTX
Cloud security ppt
PPTX
Introduction to AWS VPC, Guidelines, and Best Practices
PDF
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
Cloud computing-security-issues
Understanding Azure AD
Azure Key Vault - Getting Started
Introduction to Cloud Computing and AWS
Evolution of Cloud Computing
Microsoft Azure Overview
Azure Identity and access management
Azure governance v4.0
Terraform -- Infrastructure as Code
Presentation cloud computing
Cloud computing ppt
The Layman's Guide to Microsoft Azure
AWS VPC.pdf
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Wi-FI Hacking
Cloud Security: A New Perspective
Cloud security ppt
Introduction to AWS VPC, Guidelines, and Best Practices
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
Ad

Similar to Install a micro k8s single node cluster of kubernetes on windows 10 (20)

PDF
kubernetes - minikube - getting started
PDF
Run K8s on Local Environment
PDF
Hands-On Introduction to Kubernetes at LISA17
PDF
Kubernetes installation
PPTX
Learn kubernetes in 90 minutes
PDF
Docker and Kubernetes 101 workshop
PDF
How to Install KVM (Kernel-based Virtual Machine) on Debian 12
PPTX
KuberneteSADASDSADASDASDASDASDASDAs Labs.pptx
PDF
OSS Japan 2019 service mesh bridging Kubernetes and legacy
PDF
Startup guide for kvm on cent os 6
PDF
Setting up a kubernetes cluster on ubuntu 18.04- loves cloud
PPTX
IBM MQ in containers MQTC 2017
PDF
kubernetes for beginners
PPTX
Tanzu Kubernetes Grid - Presentation.pptx
PDF
Deploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
DOCX
Krenel Based Virtual Machine In Centos7
PDF
Ansible Workshop for Pythonistas
DOCX
Deploy the blockchain network using kubernetes ap is on google cloud
DOCX
Virtual box installation
PPTX
Workshop MSF4J - Getting Started with Microservices and Java
kubernetes - minikube - getting started
Run K8s on Local Environment
Hands-On Introduction to Kubernetes at LISA17
Kubernetes installation
Learn kubernetes in 90 minutes
Docker and Kubernetes 101 workshop
How to Install KVM (Kernel-based Virtual Machine) on Debian 12
KuberneteSADASDSADASDASDASDASDASDAs Labs.pptx
OSS Japan 2019 service mesh bridging Kubernetes and legacy
Startup guide for kvm on cent os 6
Setting up a kubernetes cluster on ubuntu 18.04- loves cloud
IBM MQ in containers MQTC 2017
kubernetes for beginners
Tanzu Kubernetes Grid - Presentation.pptx
Deploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Krenel Based Virtual Machine In Centos7
Ansible Workshop for Pythonistas
Deploy the blockchain network using kubernetes ap is on google cloud
Virtual box installation
Workshop MSF4J - Getting Started with Microservices and Java
Ad

Recently uploaded (20)

PDF
System and Network Administraation Chapter 3
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
top salesforce developer skills in 2025.pdf
PPTX
history of c programming in notes for students .pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Nekopoi APK 2025 free lastest update
PDF
medical staffing services at VALiNTRY
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Introduction to Artificial Intelligence
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Odoo POS Development Services by CandidRoot Solutions
System and Network Administraation Chapter 3
Wondershare Filmora 15 Crack With Activation Key [2025
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
top salesforce developer skills in 2025.pdf
history of c programming in notes for students .pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Which alternative to Crystal Reports is best for small or large businesses.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Nekopoi APK 2025 free lastest update
medical staffing services at VALiNTRY
Design an Analysis of Algorithms II-SECS-1021-03
VVF-Customer-Presentation2025-Ver1.9.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Introduction to Artificial Intelligence
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Odoo POS Development Services by CandidRoot Solutions

Install a micro k8s single node cluster of kubernetes on windows 10

  • 1. Install a MicroK8s single node cluster locally on Windows 10 By Philippe Beraud, Microsoft France This walkthrough guides you through all the steps required to create and configure a MicroK8s cluster on Windows 10. Kubernetes1 runs on Linux. As such, MicroK8s2 provides a single command installation of the latest Kubernetes release on a Linux machine for development and testing. MicroK8s is easy to install and use on Ubuntu or any other Linux distro which supports snaps, i.e. pre-packaged applications (similar to Docker containers). Although Windows 10 now has some very useful features, such as the ability to install Ubuntu as an app, the integration of Windows Subsystem for Linux 2 (WSL2) doesn’t provide (yet) all the Ubuntu functionalities required to make MicroK8s run smoothly right out-of-the-box (OOB) and thus use the snap daemon. If you wish to experiment with running MicroK8s semi-natively, see: • Discourse post Using snapd in WSL2 • Post Running Snaps on WSL2 (Insiders only for now) along with the short YouTube video Use this ONE trick to run Linux Snap packages in Windows Subsystem for Linux 2 (WSL2) For now, and for the sake of simplicity for anyone looking to try out Kubernetes on Windows 10, let’s run MicroK8s on Windows 10 with virtualization. MicroK8s will install without problems on Ubuntu on a virtual machine (VM). The Canonical way to get a Linux VM on Windows 10 and to run MicroK8s in it is with multipass. Multipass gives you an easy to use interface to manage VMs on Windows 10 – Same is true on MacOS and Linux -. On Windows platforms, multipass defaults to using Microsoft Hyper-V as it’s virtualization provider. So, Microsoft Hyper-V is a prerequisite. (You can also take advantage of a local installation of VirtualBox if you want to.) Note For more information, see Instant Ubuntu VMs. Enabling Hyper-V The Windows 10 Hyper-V System requires: • Windows 10 Enterprise, Pro, or Education • 64-bit Processor with Second Level Address Translation (SLAT). • CPU support for VM Monitor Mode Extension (VT-c on Intel CPUs). • Minimum of 4 GB memory. Note For more information and troubleshooting, see Windows 10 Hyper-V System Requirements. Perform the following steps: 1. Open a PowerShell console as an Administrator. 1 https://kubernetes.io/ 2 https://github.com/ubuntu/microk8s
  • 2. 2. Check if virtualization is supported: PS C:> systeminfo If you see the following output, virtualization is supported. You can proceed with the next steps. Hyper-V Requirements: VM Monitor Mode Extensions: Yes Virtualization Enabled In Firmware: Yes Second Level Address Translation: Yes Data Execution Prevention Available: Yes If you see the following output, your system already has a Hypervisor installed and you can skip the next steps below. Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed. Otherwise, virtualization is unfortunately not supported on your machine, and you can not continue with this walkthrough. 3. Run the following command: PS C:> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All Note If the command couldn't be found, make sure you're running PowerShell as Administrator. 4. Once the installation has completed, reboot your Windows 10 machine. Creating the Ubuntu 18.04 LTS VM Perform the following steps: 1. Download and install multipass. The latest Windows 10 installer is available for download here on the multipass GitHub releases page. 2. Once multipass is installed, you can now create a VM to run MicroK8s. At least 4 Gb of RAM and 40 Gb of storage is recommended – you can pass these requirements when you launch the VM – a. Open a PowerShell console. b. Creates a new Ubuntu VM instance using the default, at this point in time, image: PS C:> multipass launch --name microk8s-vm --mem 4G --disk 40G It’s most likely going to be the latest cloud image of the newest Ubuntu LTS (Long Term Support) release, at the time of this writing a 18.04 LTS release. Note You can also choose another image, you can use the find command to see what’s available.
  • 3. Note For a complete listing of the available commands and their options in multipass, see the Command-line reference. When the command completes, a new VM named microk8s-vm is running. You can see it from the Hyper-V Manager. One should note that multipass uses the “Default Switch” network interface on Hyper-V, that, in turn, uses the “Internet Sharing” functionality, providing DHCP (IP addresses) and DNS (domain name resolution) to the instances. 3. Find the IP address which has been allocated to the VM: PS C:> multipass list Name State IPv4 Image microk8s-vm Running 172.22.82.139 Ubuntu 18.04 LTS Take a note of this IP as services will become available there when accessed from the Windows 10 host machine, see below. For example ,172.22.82.139 in our configuration. 4. To work within the VM environment more easily, get a shell inside the VM: C:> multipass shell microk8s-vm
  • 4. This opens up a new Shell window: From within the VM shell, you can now follow along the rest of the quick start instructions for installing MicroK8s on multipass. Installing the MicroK8s cluster Perform the following steps: 1. Install the latest version of the MicroK8s snap: $ sudo snap install microk8s --classic Note Microk8s is a snap deploying Kubernetes. The MicroK8s snap closely follows upstream Kubernetes, so understanding a bit about the Kubernetes release cycle is helpful for more insight into MicroK8s releases. Upstream Kubernetes ships a new release series (e.g. 1.16.x) approximately every three months. For more information, see Snap channel overview. That’s all it takes for the installation, which is quick and painless! ;-) 2. MicroK8s has a built-in command to display its status (see hereafter). During installation you can use the --wait-ready flag to wait for the Kubernetes services to initialize. Check the status: $ sudo microk8s.status --wait-ready
  • 5. The microk8s-vm VM now runs a MicroK8s cluster on to of Ubuntu 18.04 LTS. MicroK8s comes with a set of tools: microk8s.start, microk8s.stop, microk8s.inspect, microk8s.status, microk8s.enable, microk8s.disable, microk8s.kubectl, microk8s.istioctl, and microk8s.config: • microk8s.start and microk8s.stop do what you would expect: start or stop your Kubernetes cluster. • microk8s.inspect gives you see the actual Kubernetes cluster status. • microk8s.status is a little less intuitive, as it shows the status of the add-ons and not the Kubernetes cluster status. You will use it alongside microk8s.enable and microk8s.disable to control add-ons. • microk8s.kubectl is a wrapper around kubectl, i.e. the cluster manager tool for Kubernetes. • microk8s.istioctl is used to control Istio, which can be enabled as an add-on via microk8s.enable istio. • microk8s.config, shows the client configuration that can be used to connect to your Kubernetes cluster, should you decide not to use microk8s.kubectl to do that. This command will result in output like the following: apiVersion: v1 clusters: - cluster: server: https://172.17.18.79:16443 name: microk8s-cluster contexts: - context: cluster: microk8s-cluster user: admin name: microk8s current-context: microk8s kind: Config preferences: {} users: - name: admin user: username: admin password: UFpWSGlHZDJuSkxpcCtJZ0JTU1dDK2d0eWk3NTdhZEg0TjVQcWVDc3Ywdz0K To feed this client config to microk8s.kubectl, you can for example write it to ~/.kube/config, i.e. the default configuration location.
  • 6. $ sudo microk8s.config > $HOME/.kube/config 3. Configure the network: $ sudo iptables -P FORWARD ACCEPT 4. MicroK8s creates a group to enable seamless usage of commands which require admin privilege. Add your current user to the group: $ sudo usermod -a -G microk8s ubuntu You will also need to re-enter the session for the group update to take place. 5. As mentioned above, MicroK8s bundles its own version of kubectl for accessing Kubernetes. Use it to run commands to monitor and control your Kubernetes. For example, view your node: $ microk8s.kubectl get nodes NAME STATUS ROLES AGE VERSION microk8s-vm Ready <none> 5m27s v1.17.0 6. Or alternatively see the running services: $ microk8s.kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.152.183.1 <none> 443/TCP 6m17s 7. MicroK8s uses a namespaced kubectl command to prevent conflicts with any existing installs of the Kubernetes command-line tool, kubectl. kubectl allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs. See Overview of kubectl. If you don't have an existing install, it is easier to add an alias (append to ~/.bash_aliases) like this: $ sudo snap alias microk8s.kubectl kubectl Added: - microk8s.kubectl as kubectl Otherwise, from the Bash terminal console, to install the latest version of kubectl, run the following command: $ snap install kubectl –classic $ kubectl version See Install kubectl on Linux. At this stage, you have a fully functional Kubernetes cluster.
  • 7. Creating a test deployment on the MicroK8s cluster Kubernetes is meant for deploying apps and services. You now can use the kubectl (alias) command (or the microk8s.kubectl command) to do that as with any Kubernetes. To install a first app, perform the following steps: 1. From the VM Shell, deploy NGINX with 3 replicas (instances) available: $ kubectl run nginx --image nginx:alpine --replicas 3 2. It may take a minute or two to install, but you can check the status. Once NGINX has been deployed, expose the application: $ kubectl expose deployment nginx --port 80 --target-port 80 --type ClusterIP -- selector=run=nginx --name nginx 3. See the new Service and ClusterIP address assigned: $ kubectl get svc You now have a deployed an application to a fully functional Kubernetes cluster using Microk8s Further configuring the MicroK8s cluster MicroK8s uses the minimum of components for a pure, lightweight Kubernetes. However, plenty of extra features are available thanks to "add-ons", i.e. pre-packaged components that provide extra capabilities. To turn on standards services, perform the following steps: 1. From the VM Shell, deploy a series addons: $ sudo microk8s.enable dns dashboard registry This will deploy: • DNS (dns). This addon may be required by others, thus we recommend you always enable it. • Kubernetes dashboard (dashboard) as well as Grafana and influxDB. • A docker private registry (registry) and expose it on localhost:32000. The storage addon (storage) will be enabled as part of this addon.
  • 8. Note Similarly, microk8s.disable turns off a service. Try microk8s.enable --help for a list of available services built in. For more information, see MicroK8s Addons. 2. Check the deployment progress of your addons: $ kubectl get all --all-namespaces
  • 9. 3. Let’s now access the Kubernetes dashboard. As you can see above, the kubernetes-dashboard service in the kube-system namespace has an internal ClusterIP of 10.152.183.231 and listens on TCP port 443. a. Set up a proxy to pass and allow external requests to the dashboard: $ sudo kubectl proxy --accept-hosts=.* --address=0.0.0.0 & Note that the & at the end of this command string will run the command in the background. b. You now should be able to access the Kubernetes dashboard by entering the following URL: http://<IP_address>:8001/api/v1/namespaces/kube-system/services/https:kubernetes- dashboard:/proxy/ Since you are running a MicroK8s cluster in a VM, <IP_address> should be the IP address of the microk8s-vm VM so that the Kubernetes dashboard can be accessed from your local Windows 10 machine. For example, 172.22.82.139 in our configuration. http://172.22.82.139:8001/api/v1/namespaces/kube-system/services/https:kubernetes- dashboard:/proxy/ From your Windows 10 host machine, open a browser session and navigate to the above URL and you will see the Kubernetes dashboard UI.
  • 10. c. At this point, the Kubernetes dashboard requires a token for gaining access. Create a list of all the service names, with their secret name attached: $ sudo kubectl -n kube-system get secret
  • 11. d. Retrieve the secret token for the Kubernetes dashboard: Important note Make sure to modify the 8bt92 entry to match the secret key associated with the Kubernetes dashboard instance for your MicroK8s installation. $ sudo kubectl -n kube-system describe secret kubernetes-dashboard-token-8bt92 Name: kubernetes-dashboard-token-8bt92 Namespace: kube-system Labels: <none> Annotations: kubernetes.io/service-account.name: kubernetes-dashboard kubernetes.io/service-account.uid: fcafb527-b246-4a39-8a9e-8e8d7c6c5225 Type: kubernetes.io/service-account-token Data ==== ca.crt: 1103 bytes namespace: 11 bytes token: eyJhbGciOiJSUzI1NiIsImtpZCI6Im9YZlF6c0pzNjlESmRUYXkzSlp3cjVYZkpwZDlidmNIUGdITG5CWUt5REUifQ. eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1 lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdW Jlcm5ldGVzLWRhc2hib2FyZC10b2tlbi04YnQ5MiIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZ S1hY2NvdW50Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQv c2VydmljZS1hY2NvdW50LnVpZCI6ImZjYWZiNTI3LWIyNDYtNGEzOS04YTllLThlOGQ3YzZjNTIyNSIsInN1YiI6InN 5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlLXN5c3RlbTprdWJlcm5ldGVzLWRhc2hib2FyZCJ9.iYtoRdb4Qq9c4JL1n SlFec631agfa-iV69shGoYhOWsBJCSuYCEal5Z5QxBC1lmuMp8fA- vlXqm4vGboPIRHcrBZMHjzuNzWi0AsOdWQNWMqjoOsPA4NEYYsHN8embQBo5n3GNBYEMXNcTmZ5YY7qblHfzzZnje2S S33ETQI_NuO4-cGVWk1mydUtnGhQkOLsYiDmkJKYt5CUIsgbTZvkynUmFHUZmjMSIAz1K2gdU1MqhGI2- n9BpmdWQWHlpWH27_yTmvCivYznX6KPIsjG6jHHv4PFyw3PEFIXhkuOPL2MTwuKCx8Bcw7cEYSPd0uay8zVpvcipdeC JORKUxTfw
  • 12. The above command displays a long string of characters after token :. Copy that string and then go back to your browser session. e. In the above Kubernetes Dashboard dialog, select Token and then paste the copied token into the Enter token* text field. Click Sign in and the Kubernetes dashboard should open up. Alternatively, you can allow accessing the Kubernetes dashboard without requiring such a token. To do so: a. Edit the deployment file for the dashboard service: $ sudo kubectl -n kube-system edit deploy kubernetes-dashboard -o yaml b. Add the –enable-skip-login flag to the deployment’s specs. Scroll down to the line after - --namespace=kube-system, press i, type “- --enable-skip-login”, press ESC, and then type “:w”. spec: progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: k8s-app: kubernetes-dashboard strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: creationTimestamp: null
  • 13. labels: k8s-app: kubernetes-dashboard spec: containers: - args: - --auto-generate-certificates - --namespace=kube-system - --enable-skip-login c. Type “:x” to exit the vim editor. d. Navigate to the previous URL: http://172.22.82.139:8001/api/v1/namespaces/kube-system/services/https:kubernetes- dashboard:/proxy/ e. Click Skip. Et voilà! 4. Let’s now access the Grafana dashboard instead. The API server proxies your services. Get to them: $ kubectl cluster-info Kubernetes master is running at https://127.0.0.1:16443 Heapster is running at https://127.0.0.1:16443/api/v1/namespaces/kube- system/services/heapster/proxy CoreDNS is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/kube- dns:dns/proxy Grafana is running at https://127.0.0.1:16443/api/v1/namespaces/kube- system/services/monitoring-grafana/proxy InfluxDB is running at https://127.0.0.1:16443/api/v1/namespaces/kube- system/services/monitoring-influxdb:http/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
  • 14. Grafana is running at https://127.0.0.1:16443/api/v1/namespaces/kube- system/services/monitoring-grafana/proxy/. 5. Open a browser on your Windows 10 host machine and navigate to the following URL: http://<IP_address>:8001/api/v1/namespaces/kube-system/services/https:kubernetes- dashboard:/proxy/ As before, since you are running a MicroK8s cluster in a VM, <IP_address> should be the IP address of the microk8s-vm VM so that the Kubernetes dashboard can be accessed from your local Windows 10 machine. For example, 172.22.82.139 in our configuration. http://172.22.82.139:8001/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy The Grafana dashboard should open up. So, let’s remove the service and pods you have previously deployed: $ kubectl delete service nginx service "nginx" deleted $ kubectl delete deployment nginx deployment.apps "nginx" deleted At this stage, your MicroK8s cluster will continue running until you decide to stop it. You can stop MicroK8s with this simple command: $ microk8s.stop
  • 15. You can start again any time by running: $ microk8s.start This concludes this walkthrough. You can now start using your MicroK8s single node cluster the way you expect on your Windows 10 machine. This is great for technical ram-up on Kubernetes, local development, and CI/CD. Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)