Skip to main content

MicroK8s

MicroK8s is a lightweight Cloud Native Computing Foundation (CNCF) certified Kubernetes distribution developed by Canonical. It deploys all Kubernetes services in a single, fully contained package, while also offering out-of-the-box add-ons.

Palette offers MicroK8s as Kubernetes distribution available for creating clusters. You can use MicroK8s as the Kubernetes layer when creating cluster profiles and then use the cluster profiles to deploy clusters.

Support Lifecycle

We support different Kubernetes distributions, such as MicroK8s, K3s, and RKE2, until their official End-of-Life (EOL). The EOL is set by the respective owner. Once we stop supporting the minor version, we initiate the deprecation process. Refer to the Kubernetes Support Lifecycle guide to learn more.

tech preview
This is a Tech Preview feature and is subject to change. Do not use this feature in production workloads.

Versions Supported

Prerequisites

  • A minimum of 20 GB of disk space and 4 GB of memory.

  • Operating System (OS) pack layer and infrastructure provider dependencies as listed in the table below.

    Infrastructure PlatformOSVersionSupported?
    AWSUbuntu22.04
    MAASUbuntu22.04

Parameters

ParameterDescription
microk8sConfig.addonsA list of MicroK8s addons you can set for your cluster. Ingress and DNS are mandatory and enabled by default.
microk8sConfig.upgradeStrategyIt describes how to replace existing nodes of your cluster with new ones during upgrades. Values can be RollingUpgrade (default), InPlaceUpgrade, or SmartUpgrade. Refer to the Usage section for guidance.
microk8sConfig.bootCommandsA list of commands you can set to be executed during boot.
microk8sConfig.preRunCommandsA list of commands you can set to be executed before installing MicroK8s in your cluster.
microk8sConfig.postRunCommandsA list of commands you can set to be executed after installing MicroK8s in your cluster.

Usage

To use MicroK8s, select it as the Kubernetes distribution when choosing the Kubernetes layer during the cluster profile creation. Remember that the cloud type must be either AWS or MAAS, and the OS layer must be Ubuntu 22.04.

A view of the cluster profile Kubernetes selection screen

info

MicroK8s clusters use the Calico CNI by default. However, this default installation was disabled due to Palette's requirement for a CNI layer to be present in the cluster profiles. This way, users can choose their preferred CNI layer during the cluster profile creation.

Upgrade Strategy

The upgrade strategy describes how to replace existing control plane nodes with new ones during upgrades.

You can specify the upgrade strategy during cluster profile creation by editing the value of the upgradeStrategy parameter in the MicroK8s pack YAML file displayed under the Pack Details section.

warning

Before upgrading your cluster, review the Known Issues and the Kubernetes Upgrades pages to learn about the limitations associated with MicroK8s upgrades.

The MicroK8s pack supports three types of upgrade strategies:

  • InPlaceUpgrade - Performs an in-place upgrade of the control plane. For clusters with one control plane and one worker node, InPlaceUpgrade temporarily shuts down the API server.

  • RollingUpgrade - The default upgrade strategy that deletes the current control plane node before creating a new one.

  • SmartUpgrade - Performs an in-place upgrade of the control plane on clusters with fewer than three control plane nodes, and a rolling upgrade on clusters with three or more control plane nodes.

Terraform

You can reference the MicroK8s pack in Terraform with the following data resource.

data "spectrocloud_registry" "public_registry" {
name = "Public Repo"
}

data "spectrocloud_pack" "k8s" {
name = "kubernetes-microk8s"
version = "1.27"
registry_uid = data.spectrocloud_registry.public_registry.id
}

References