MicroK8s est un outil permettant de deployer ultra facilement un cluster Kubernetes sur n'importe quel distribution linux compatible avec Snap .
Pour installer Microk8s il vous faut un systeme d'exploitation linux avec le paquet snapd d'installé.
Pour ma part j'ai réaliser cette installation sur Ubuntu Server 24.04, j'ai réalisé un post pour l'installation de snap que vous retrouverez via ce lien
Executer cette commande dans un terminal:
snap install microk8s --classic
MicroK8s est maintenant installé, vous pouvez interrogé votre cluster kubernetes (qui pour l'instant n'est composé que d'un noeud) a l'aide de cette commande:
microk8s.kubectl get all --all-namespace -o wide
ce qui vous affichera le contenu de votre cluster.
MicroK8s possède plusieurs options vous permettant notamment d'activer/désactiver des plugins vous permettant de deployer en une commande des foncionnalité suplémentaire a votre cluster comme le dashboard accessible depuis un navigateur, voici la commande:
microk8s enable dashboard
puis cette commande pour le rendre accessible a la demande:
microk8s dashboard-proxy
Checking if Dashboard is running.
Infer repository core for addon dashboard
Waiting for Dashboard to come up.
Trying to get token from microk8s-dashboard-token
Waiting for secret token (attempt 0)
Dashboard will be available at https://127.0.0.1:10443
Use the following token to login:
uQ5Tgx9Q3IwWeJWPk26prhLl00AKQqcPAuy!959q=XFgyQua?/8D!EF!eJBoRmNXRMy4nerpj8fWxyc90O2mcigfm3NXhT/3J6lX53d5y!cJOmFDbrBvaMaYtR/P1VaKaRQqZBa2H/lJtxKrsFIVYjGU2-sV9CTBRc-anbnOX1jRm?HDYgIZVAjpkFnnhhKTZdyFYj1pFIf/2BFWflagga3F=AQpFuidsJ3019CYaA-B1M!pWQQ0YMJqdPRP9b?L
Dans votre navigateur mettez l'adresse ip correspondant a votre serveur/VM : https://<ip du serveur>:10443
Saisissez le token qui a été généré précédement dans votre terminal et cliquer sur connexion:
Vous voila connecté au Dashboard de votre cluster kubernetes microk8s.
pour connaitre la liste des plugins executer la commande:
microk8s status
Voici la liste des plugins officiels:
addons:
enabled:
community # (core) The community addons repository
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
hostpath-storage # (core) Storage class; allocates storage from host directory
ingress # (core) Ingress controller for external access
metallb # (core) Loadbalancer for your Kubernetes cluster
metrics-server # (core) K8s Metrics Server for API access to service metrics
observability # (core) A lightweight observability stack for logs, traces and metrics
rbac # (core) Role-Based Access Control for authorisation
registry # (core) Private image registry exposed on localhost:32000
storage # (core) Alias to hostpath-storage add-on, deprecated
disabled:
cert-manager # (core) Cloud native certificate management
cis-hardening # (core) Apply CIS K8s hardening
gpu # (core) Alias to nvidia add-on
host-access # (core) Allow Pods connecting to Host services smoothly
kube-ovn # (core) An advanced network fabric for Kubernetes
mayastor # (core) OpenEBS MayaStor
minio # (core) MinIO object storage
nvidia # (core) NVIDIA hardware (GPU and network) support
prometheus # (core) Prometheus operator for monitoring and logging
rook-ceph # (core) Distributed Ceph storage using Rook
Vous pouvez activer le plugin community pour obtenir plus de plugins venant de la communauté grace a cette commande:
microk8s enable community
Voici la liste des plugins communautaire au moment d'écrire ce post (02/01/2025)
argocd # (community) Argo CD is a declarative continuous deployment for Kubernetes.
cilium # (community) SDN, fast with full network policy
cloudnative-pg # (community) PostgreSQL operator CloudNativePG
dashboard-ingress # (community) Ingress definition for Kubernetes dashboard
easyhaproxy # (community) EasyHAProxy can configure HAProxy automatically based on ingress labels
falco # (community) Cloud-native runtime threat detection tool for Linux and K8s
fluentd # (community) Elasticsearch-Fluentd-Kibana logging and monitoring
gopaddle # (community) Low-Code Kubernetes IDE with AI Co-pilot
inaccel # (community) Simplifying FPGA management in Kubernetes
istio # (community) Core Istio service mesh services
jaeger # (community) Kubernetes Jaeger operator with its simple config
kata # (community) Kata Containers is a secure runtime with lightweight VMS
keda # (community) Kubernetes-based Event Driven Autoscaling
knative # (community) Knative Serverless and Event Driven Applications
kubearmor # (community) Cloud-native runtime security enforcement system for k8s
kwasm # (community) WebAssembly support for WasmEdge (Docker Wasm) and Spin (Azure AKS WASI)
linkerd # (community) Linkerd is a service mesh for Kubernetes and other frameworks
microcks # (community) Open source Kubernetes Native tool for API Mocking and Testing
multus # (community) Multus CNI enables attaching multiple network interfaces to pods
nfs # (community) NFS Server Provisioner
ngrok # (community) ngrok Ingress Controller instantly adds connectivity, load balancing, authentication, and observability to your services
openebs # (community) OpenEBS is the open-source storage solution for Kubernetes
openfaas # (community) OpenFaaS serverless framework
osm-edge # (community) osm-edge is a lightweight SMI compatible service mesh for the edge-computing.
parking # (community) Static webserver to park a domain. Works with EasyHAProxy.
portainer # (community) Portainer UI for your Kubernetes cluster
shifu # (community) Kubernetes native IoT software development framework.
sosivio # (community) Kubernetes Predictive Troubleshooting, Observability, and Resource Optimization
sriov-device-plugin # (community) SR-IOV Network Device Plugin.
stunner # (community) A Kubernetes media gateway for WebRTC
traefik # (community) traefik Ingress controller
trivy # (community) Kubernetes-native security scanner
cette documentation est basé sur la version anglaise officielle, disponible via ce lien.