diff --git a/docs/docs-content/integrations/microk8s.md b/docs/docs-content/integrations/microk8s.md index 7ca25d8f2c..84e75ad4f0 100644 --- a/docs/docs-content/integrations/microk8s.md +++ b/docs/docs-content/integrations/microk8s.md @@ -10,99 +10,291 @@ logoUrl: "https://registry.spectrocloud.com/v1/kubernetes-microk8s/blobs/sha256: tags: ["packs", "microk8s", "kubernetes"] --- -MicroK8s is a Cloud Native Computing Foundation (CNCF) certified upstream Kubernetes deployment that runs entirely on -your workstation or edge device. It runs all Kubernetes services natively without virtual machines and packs all the -required libraries and binaries. +[MicroK8s](https://microk8s.io) is a lightweight Cloud Native Computing Foundation (CNCF) certified Kubernetes +distribution developed by [Canonical](https://canonical.com). It deploys all Kubernetes services in a single, fully +contained package, while also offering out-of-the-box [add-ons](https://microk8s.io/docs/addons). -### Support Lifecycle +Palette offers MicroK8s as Kubernetes distribution available for creating clusters. You can use MicroK8s as the +Kubernetes layer when creating [cluster profiles](../profiles/profiles.md) and then use the cluster profiles to deploy +clusters. -We support other Kubernetes distributions such as K3s, Microk8s, and RKE2 until their official 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](kubernetes-support.md#palette-extended-kubernetes-support) guide to learn more. +### Support Lifecycle -:::warning +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](kubernetes-support.md#other-kubernetes-distributions) guide to learn more. -Once you upgrade your cluster to a new Kubernetes version, you will not be able to downgrade. We recommend that, before -upgrading, you review the information provided in the [Kubernetes Upgrades](kubernetes-support.md#kubernetes-upgrades) -section. +:::preview ::: -## Prerequisites +## Versions Supported -- One of the following Ubuntu environments to run commands: + - - 22.04 LTS - - 20.04 LTS - - 18.04 LTS - - 16.04 LTS + + + + +### 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 Platform | OS | Version | Supported? | + | ----------------------- | ------ | ------- | ------------------ | + | AWS | Ubuntu | 22.04 | :white_check_mark: | + | MAAS | Ubuntu | 22.04 | :white_check_mark: | + +### Parameters + +| Parameter | Description | +| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `microk8sConfig.addons` | A list of [MicroK8s addons](https://microk8s.io/docs/addons) you can set for your cluster. `Ingress` and `DNS` are mandatory and enabled by default. | +| `microk8sConfig.upgradeStrategy` | It 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](#usage) section for guidance. | +| `microk8sConfig.bootCommands` | A list of commands you can set to be executed during boot. | +| `microk8sConfig.preRunCommands` | A list of commands you can set to be executed before installing MicroK8s in your cluster. | +| `microk8sConfig.postRunCommands` | A 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](/integrations_microk8s_cluster-profile-view.webp) + +:::info + +MicroK8s clusters use the [Calico CNI](https://microk8s.io/docs/change-cidr) 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](../release-notes/known-issues.md) and the +[Kubernetes Upgrades](kubernetes-support.md#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. + + + + + +### 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 Platform | OS | Version | Supported? | + | ----------------------- | ------ | ------- | ------------------ | + | AWS | Ubuntu | 22.04 | :white_check_mark: | + | MAAS | Ubuntu | 22.04 | :white_check_mark: | + +### Parameters + +| Parameter | Description | +| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `microk8sConfig.addons` | A list of [MicroK8s addons](https://microk8s.io/docs/addons) you can set for your cluster. `Ingress` and `DNS` are mandatory and enabled by default. | +| `microk8sConfig.upgradeStrategy` | It 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](#usage) section for guidance. | +| `microk8sConfig.bootCommands` | A list of commands you can set to be executed during boot. | +| `microk8sConfig.preRunCommands` | A list of commands you can set to be executed before installing MicroK8s in your cluster. | +| `microk8sConfig.postRunCommands` | A list of commands you can set to be executed after installing MicroK8s in your cluster. | + +:::tip + +Even though the `microk8sConfig.bootCommands`, `microk8sConfig.preRunCommands`, and `microk8sConfig.postRunCommands` +parameters are not visible in the YAML file displayed for the MicroK8s pack during cluster profile creation, you can +manually add them to the pack settings according to the example below. + +```yaml +microk8sConfig: + addons: + - dns + - ingress + upgradeStrategy: RollingUpgrade + bootCommands: + - 'echo "===> bootCommands1" > /home/ubuntu/myfile1.txt' + preRunCommands: + - 'echo "===> preRunCommands1" > /home/ubuntu/myfile3.txt' + postRunCommands: + - 'echo "List of postRun commands to be executed"' +``` + ::: +### 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](/integrations_microk8s_cluster-profile-view.webp) + +:::info + +MicroK8s clusters use the [Calico CNI](https://microk8s.io/docs/change-cidr) 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](../release-notes/known-issues.md) and the +[Kubernetes Upgrades](kubernetes-support.md#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. + + + + + +:::warning + +All versions less than version 1.26.x are considered deprecated. Upgrade to a newer version to take advantage of new +features. + +::: + + + + +## Terraform + +You can reference the MicroK8s pack in Terraform with the following data resource. + +```hcl +data "spectrocloud_registry" "public_registry" { + name = "Public Repo" +} + +data "spectrocloud_pack" "k8s" { + name = "kubernetes-microk8s" + version = "1.28" + registry_uid = data.spectrocloud_registry.public_registry.id +} +``` + ## References -- [MicroK8s ](https://microk8s.io/docs) +- [MicroK8s Documentation](https://microk8s.io/docs) +- [MicroK8s GitHub Repository](https://github.com/canonical/microk8s) diff --git a/static/assets/docs/images/integrations_microk8s_cluster-profile-view.webp b/static/assets/docs/images/integrations_microk8s_cluster-profile-view.webp new file mode 100644 index 0000000000..a1e7be4537 Binary files /dev/null and b/static/assets/docs/images/integrations_microk8s_cluster-profile-view.webp differ