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.21.x) approximately every three months. Prior release series may get periodic bugfix releases: for example, the latest 1.18 release is 1.18.16.
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.21 with risk level set to stable you need to:
sudo snap install microk8s --classic --channel=1.21/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.20/stable: v1.20.5 2021-04-02 (2094) 218MB classic 1.20/candidate: v1.20.5 2021-03-27 (2094) 218MB classic 1.20/beta: v1.20.5 2021-03-27 (2094) 218MB classic 1.20/edge: v1.20.5 2021-03-22 (2094) 218MB classic latest/stable: v1.20.5 2021-04-05 (2094) 218MB classic latest/candidate: v1.20.5 2021-03-26 (2100) 189MB classic latest/beta: v1.20.5 2021-03-26 (2100) 189MB classic latest/edge: v1.20.5 2021-04-08 (2113) 189MB classic dqlite/stable: – dqlite/candidate: – dqlite/beta: – dqlite/edge: v1.16.2 2019-11-07 (1038) 189MB classic 1.21/stable: – 1.21/candidate: v1.21.0-rc.0 2021-03-29 (2101) 192MB classic 1.21/beta: v1.21.0-beta.1 2021-03-12 (2085) 191MB classic 1.21/edge: v1.21.0-alpha.3 2021-03-08 (2080) 190MB classic 1.19/stable: v1.19.9 2021-04-02 (2095) 216MB classic 1.19/candidate: v1.19.9 2021-03-26 (2095) 216MB classic 1.19/beta: v1.19.9 2021-03-26 (2095) 216MB classic 1.19/edge: v1.19.9 2021-03-22 (2095) 216MB classic ...
If you do not set a channel at install time…
snap install microk8s --classic
…the snap install will default to ‘latest/stable’
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.18 stable release series you can run:
snap install microk8s --classic --channel=1.18/stable
In this case you will only receive updates for the 1.18 release of Kubernetes, and MicroK8s will never upgrade to 1.19, unless you explicitly refresh the snap.
*/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.
*/beta channels get updated within hours of an upstream release. Getting a MicroK8s deployment pointing to
1.19/beta is as simple as:
snap install microk8s --classic --channel=1.19/beta
*/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.
On tracks where no stable Kubernetes release is available, MicroK8s ships pre-release versions under the following scheme:
1.19/edge) holds the alpha upstream releases.
1.19/beta) holds the beta upstream releases.
1.19/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.21 release simply run:
sudo snap install microk8s --classic --channel=1.21/edge
However, be aware that pre-release versions may require you to configure the Kubernetes services on your own.
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.
I want to always be on the latest release in a specific upstream K8s release.
I want to test-drive a pre-stable release.
--channel=<next_release>/edgefor alpha releases.
--channel=<next_release>/betafor beta releases.
--channel=<next_release>/candidatefor candidate releases.
I am waiting for a bug fix on MicroK8s:
I am waiting for a bug fix on upstream Kubernetes:
It is possible to change the snap channel using the refresh command. E.g. to transition from 1.19 stable to the latest alpha:
sudo snap refresh microk8s --channel=1.19/edge
By default, snaps are set to check for updates and automatically refresh to the
latest version (for your selected channel) four times per day. There are some
scenarios however where it may be inconvenient or difficult to refresh the
current snap so often.
There are some controls available to set the global refresh schedule for
all snaps on the system. These are outlined in the
Last updated 6 months ago. Help improve this document in the forum.