Selecting a snap channel

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.26.x) approximately every three months. Prior release series may get periodic bugfix releases: for example, the latest 1.24 release is 1.24.8.

Choosing the right channel

When installing the MicroK8s you can specify a channel. The channel specified is made up of two components; the track and the risk level. For example to install MicroK8s v1.26 with risk level set to stable you need to:

sudo snap install microk8s --classic --channel=1.26/stable

The track denotes the upstream Kubernetes version while the risk level reflects the maturity level of the release. The stable risk level indicates that your cluster is updated when the MicroK8s team decides a release is ready and no issues have been revealed by users running the same revision on riskier branches (edge and candidate).

All the currently available channels are shown if you run snap info microk8s:

...
channels:
  1.25/stable:           v1.25.4  2022-11-24 (4221) 174MB classic
  1.25/candidate:        v1.25.4  2022-11-15 (4221) 174MB classic
  1.25/beta:             v1.25.4  2022-11-15 (4221) 174MB classic
  1.25/edge:             v1.25.5  2022-12-08 (4357) 174MB classic
  latest/stable:         v1.25.4  2022-11-25 (4221) 174MB classic
  latest/candidate:      v1.26.0  2022-12-09 (4381) 176MB classic
  latest/beta:           v1.26.0  2022-12-09 (4381) 176MB classic
  latest/edge:           v1.26.0  2022-12-09 (4392) 176MB classic
  dqlite/stable:         –                                
  dqlite/candidate:      –                                
  dqlite/beta:           –                                
  dqlite/edge:           v1.16.2  2019-11-07 (1038) 189MB classic
  1.26-strict/stable:    v1.26.0  2022-12-10 (4395) 176MB -
  1.26-strict/candidate: v1.26.0  2022-12-10 (4395) 176MB -
  1.26-strict/beta:      v1.26.0  2022-12-10 (4395) 176MB -
  1.26-strict/edge:      v1.26.0  2022-12-09 (4395) 176MB -
  1.26/stable:           v1.26.0  2022-12-10 (4390) 176MB classic
  1.26/candidate:        v1.26.0  2022-12-10 (4390) 176MB classic
  1.26/beta:             v1.26.0  2022-12-10 (4390) 176MB classic
  1.26/edge:             v1.26.0  2022-12-09 (4390) 176MB classic
  1.25-strict/stable:    v1.25.4  2022-12-03 (4249) 174MB -
  1.25-strict/candidate: v1.25.4  2022-11-23 (4249) 174MB -
  1.25-strict/beta:      v1.25.4  2022-11-23 (4249) 174MB -
  1.25-strict/edge:      v1.25.5  2022-12-08 (4358) 174MB -
  1.24-eksd/stable:      v1.24-3  2022-12-10 (4305) 171MB classic
  1.24-eksd/candidate:   v1.24-3  2022-11-30 (4305) 171MB classic
  1.24-eksd/beta:        v1.24-3  2022-11-30 (4305) 171MB classic
  1.24-eksd/edge:        v1.24-4  2022-12-06 (4346) 171MB classic
  1.24/stable:           v1.24.8  2022-11-21 (4175) 224MB classic
  1.24/candidate:        v1.24.8  2022-11-15 (4175) 224MB classic
  1.24/beta:             v1.24.8  2022-11-15 (4175) 224MB classic
  1.24/edge:             v1.24.9  2022-12-08 (4368) 224MB classic
  1.23-eksd/stable:      v1.23-8  2022-11-23 (4210) 167MB classic
  1.23-eksd/candidate:   v1.23-9  2022-12-07 (4344) 167MB classic
  1.23-eksd/beta:        v1.23-9  2022-12-07 (4344) 167MB classic
  1.23-eksd/edge:        v1.23-9  2022-12-06 (4344) 167MB classic
  1.23/stable:           v1.23.14 2022-11-19 (4173) 212MB classic
  1.23/candidate:        v1.23.15 2022-12-11 (4371) 212MB classic
  1.23/beta:             v1.23.15 2022-12-11 (4371) 212MB classic
  1.23/edge:             v1.23.15 2022-12-08 (4371) 212MB classic
  1.22-eksd/stable:      v1.22-13 2022-11-20 (4202) 164MB classic
  1.22-eksd/candidate:   v1.22-14 2022-12-07 (4345) 164MB classic
  1.22-eksd/beta:        v1.22-14 2022-12-07 (4345) 164MB classic
  1.22-eksd/edge:        v1.22-14 2022-12-06 (4345) 164MB classic
  1.22/stable:           v1.22.16 2022-11-19 (4172) 187MB classic
  1.22/candidate:        v1.22.17 2022-12-10 (4374) 187MB classic
  1.22/beta:             v1.22.17 2022-12-10 (4374) 187MB classic
  1.22/edge:             v1.22.17 2022-12-08 (4374) 187MB classic
  1.21/stable:           v1.21.13 2022-07-20 (3410) 191MB classic
  1.21/candidate:        v1.21.13 2022-07-09 (3410) 191MB classic
  1.21/beta:             v1.21.13 2022-07-09 (3410) 191MB classic
  1.21/edge:             v1.21.13 2022-06-08 (3410) 191MB classic
  1.20/stable:           v1.20.13 2021-12-08 (2760) 221MB classic
  1.20/candidate:        v1.20.13 2021-12-07 (2760) 221MB classic
  1.20/beta:             v1.20.13 2021-12-07 (2760) 221MB classic
  1.20/edge:             v1.20.14 2022-01-11 (2843) 217MB classic
  ...

If you do not set a channel at install time…

snap install microk8s --classic

…the snap install will default to ‘latest/stable’. Note that the latest/stableversion may not point to a new release immediately.

In this case you will get periodic snap updates to the current stable release at the time of the installation. Updates will not include a new series, only patch releases. This means that MicroK8s should continue running normally, even when a new series is released.

To use a specific version of Kubernetes, you can use the --channel option. For example, to install MicroK8s and let it follow the v1.24 stable release series you can run:

snap install microk8s --classic --channel=1.24/stable

In this case you will only receive updates for the 1.24 release of Kubernetes, and MicroK8s will never upgrade to 1.25, unless you explicitly refresh the snap.

Stable, candidate, beta and edge releases

The */stable channels serve the latest stable upstream Kubernetes release of the respective release series. Upstream releases are propagated to the MicroK8s snap in about a week. This means your MicroK8s will upgrade to the latest upstream release in your selected channel roughly one week after the upstream release.

The */candidate and */beta channels get updated within hours of an upstream release. Getting a MicroK8s deployment pointing to 1.26/beta is as simple as:

snap install microk8s --classic --channel=1.26/beta

The */edge channels get updated on each MicroK8s patch or upstream Kubernetes patch release.

Keep in mind that edge and beta are snap constructs and do not relate to specific Kubernetes release names.

Tracks with pre-stable releases

On tracks where no stable Kubernetes release is available, MicroK8s ships pre-release versions under the following scheme:

  • The */edge channel (eg 1.26/edge) holds the alpha upstream releases.
  • The */beta channel (eg 1.26/beta) holds the beta upstream releases.
  • The */candidate channel (eg 1.26/candidate) holds the release candidate
    of upstream releases.

Pre-release versions will be available the same day they are released upstream.

For example, to test your work against the alpha v1.26 release simply run:

sudo snap install microk8s --classic --channel=1.26/edge

However, be aware that pre-release versions may require you to configure the Kubernetes services on your own.

Strict confinement tracks

MicroK8s now supports a track which conforms to the strictmode of snap installs. Strictly confined MicroK8s is installed via the tracks that include strict in their name. For example:

snap install microk8s --channel 1.26-strict

For more information on the differences between strictly-confined MicroK8s and the classic version, please see this explanation.

I am confused. Which channel is right for me?

The single question you need to focus on is what channel should be used below:

sudo snap install microk8s --classic --channel=<which_channel?>

Here are some suggestions for the channel to use based on your needs:

  • I want to always be on the latest stable Kubernetes.

    – Use --channel=latest/stable

  • I want to always be on the latest release in a specific upstream K8s release.

    – Use --channel=<release>/stable, eg --channel=1.25/stable.

  • I want to test-drive a pre-stable release.

    – Use --channel=<next_release>/edge for alpha releases.

    – Use --channel=<next_release>/beta for beta releases.

    – Use --channel=<next_release>/candidate for candidate releases.

  • I am waiting for a bug fix on MicroK8s:

    – Use --channel=<release>/edge.

  • I am waiting for a bug fix on upstream Kubernetes:

    – Use --channel=<release>/candidate.

Changing channels

It is possible to change the snap channel using the refresh command. E.g. to transition to the latest alpha:

sudo snap refresh microk8s --channel=latest/edge

Changing the refresh schedule

By default, snaps are set to check for updates and automatically refresh to the
latest version (for your selected channel) four times per day. For deployments where this behavior is undesirable you are given the option to postpone, schedule or even block automatic updates. The snap refreshes page outlines how to configure these options.

Last updated a month ago. Help improve this document in the forum.