# Installation guide
This section describes the installation procedure for MicroK8s.
# Prerequisites
Before installing MicroK8s, the following requirements are needed:
- A Linux machine
- A user account with sudo privileges
- Snap package manager installed
- To install it, refer to the Snap installation guide (opens new window).
# Installation
Using Snap:
sudo snap install microk8s --classic
To verify if the installation was completed:
microk8s.status --wait-ready
The output should be similar to:
microk8s is running
high-availability: no
datastore master nodes: 127.0.0.1:19001
datastore standby nodes: none
addons:
enabled:
dashboard # (core) The Kubernetes dashboard
dns # (core) CoreDNS
ha-cluster # (core) Configure high availability on the current node
helm # (core) Helm - the package manager for Kubernetes
helm3 # (core) Helm 3 - the package manager for Kubernetes
metrics-server # (core) K8s Metrics Server for API access to service metrics
disabled:
cert-manager # (core) Cloud native certificate management
cis-hardening # (core) Apply CIS K8s hardening
community # (core) The community addons repository
gpu # (core) Alias to nvidia add-on
host-access # (core) Allow Pods connecting to Host services smoothly
hostpath-storage # (core) Storage class; allocates storage from host directory
ingress # (core) Ingress controller for external access
kube-ovn # (core) An advanced network fabric for Kubernetes
mayastor # (core) OpenEBS MayaStor
metallb # (core) Loadbalancer for your Kubernetes cluster
minio # (core) MinIO object storage
nvidia # (core) NVIDIA hardware (GPU and network) support
observability # (core) A lightweight observability stack for logs, traces and metrics
prometheus # (core) Prometheus operator for monitoring and logging
rbac # (core) Role-Based Access Control for authorisation
registry # (core) Private image registry exposed on localhost:32000
rook-ceph # (core) Distributed Ceph storage using Rook
storage # (core) Alias to hostpath-storage add-on, deprecated
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
The next step is to enable the DNS add-on:
microk8s.enable dns
The output should be similar to:
Infer repository core for addon dns
Enabling DNS
Using host configuration from /run/systemd/resolve/resolv.conf
Applying manifest
serviceaccount/coredns created
configmap/coredns created
deployment.apps/coredns created
service/kube-dns created
clusterrole.rbac.authorization.k8s.io/coredns created
clusterrolebinding.rbac.authorization.k8s.io/coredns created
CoreDNS service deployed with IP address 10.152.183.10
Restarting kubelet
DNS is enabled
2
3
4
5
6
7
8
9
10
11
12
13
If you have a GPU, note that only NVIDIA GPUs are currently supported by MicroK8s:
microk8s.enable nvidia
Infer repository core for addon nvidia
Addon core/dns is already enabled
Addon core/helm3 is already enabled
Checking if NVIDIA driver is already installed
GPU 0: NVIDIA GeForce GTX 1650 Ti with Max-Q Design (UUID: GPU-ac64f81c-c1bf-4e5e-b930-83b9f092e33a)
"nvidia" already exists with the same configuration, skipping
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "nvidia" chart repository
Update Complete. ⎈Happy Helming!⎈
Deploy NVIDIA GPU operator
Using host GPU driver
NAME: gpu-operator
LAST DEPLOYED: Fri Mar 14 11:14:26 2025
NAMESPACE: gpu-operator-resources
STATUS: deployed
REVISION: 1
TEST SUITE: None
Deployed NVIDIA GPU operator
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
If you encounter issues with the GPU addon, refer to the official documentation (opens new window) for further guidance.
# Add registry
Before installing the Community Edition, you will have to set up a configuration file to allow MicroK8s to communicate with the private registry.
Get the IP address of the registry container, which is by default
172.18.0.10
in the docker-compose.yml (opens new window) from the community edition repository.Create the directory and configuration file:
mkdir -p /var/snap/microk8s/current/args/certs.d/172.18.0.10:5000
touch /var/snap/microk8s/current/args/certs.d/172.18.0.10:5000/hosts.toml
Normally, sudo privileges are not required.
Add the following lines inside the
hosts.toml
file:server = "http://172.18.0.10:5000" [host."http://172.18.0.10:5000"] capabilities = ["pull", "resolve"]
1
2
3
4Restart MicroK8s to have the new configuration loaded:
microk8s stop
1microk8s start
1
More information are available at the How to work with a private registry (opens new window) section of the official documentation of MicroK8s.
MicroK8s is now ready for use by Cytomine.
# Cytomine Configuration
You can now proceed with the installation of the Cytomine Community Edition.
In the Cytomine Community Edition, you will have to provide two configurations for the App Engine, namely SCHEDULER_MASTER_URL
and SCHEDULER_OAUTH_TOKEN
, which can be obtained by the following commands:
- For the MicroK8s
SCHEDULER_MASTER_URL
:microk8s.config | grep server
- For the
SCHEDULER_OAUTH_TOKEN
:microk8s kubectl create token default
WARNING
⚠️ Be aware that each time the MicroK8s cluster is restarted, the previous tokens are not valid anymore!