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.19.x) approximately every three months. Prior release series may get periodic bugfix releases: for example, the latest 1.15 release is 1.15.5.
It is important to remember that upstream Kubernetes is committed to maintain backwards compatibility only within a release series. That means that your Kubernetes should not break when you upgrade from v1.19.x
to v1.19.y
, but there is no such guarantee when upgrading from v1.18.x
to v1.19.x
.
Choosing the right channel
When installing MicroK8s you can select your desired upstream Kubernetes series by choosing the corresponding snap channel.
All the currently available channels are shown if you run snap info microk8s
:
channels:
1.19/stable: v1.19.3 2020-11-12 (1791) 214MB classic
1.19/candidate: v1.19.3 2020-11-09 (1791) 214MB classic
1.19/beta: v1.19.3 2020-11-09 (1791) 214MB classic
1.19/edge: v1.19.4 2020-11-16 (1810) 214MB classic
latest/stable: v1.19.3 2020-11-10 (1786) 214MB classic
latest/candidate: v1.19.3 2020-11-10 (1786) 214MB classic
latest/beta: v1.19.3 2020-11-10 (1786) 214MB classic
latest/edge: v1.19.4 2020-11-17 (1814) 214MB classic
dqlite/stable: –
dqlite/candidate: –
dqlite/beta: –
dqlite/edge: v1.16.2 2019-11-07 (1038) 189MB classic
1.20/stable: –
1.20/candidate: –
1.20/beta: v1.20.0-beta.1 2020-11-13 (1805) 214MB classic
1.20/edge: v1.20.0-alpha.3 2020-11-05 (1788) 214MB classic
1.18/stable: v1.18.9 2020-09-26 (1702) 199MB classic
1.18/candidate: v1.18.10 2020-11-04 (1777) 199MB classic
1.18/beta: v1.18.10 2020-11-04 (1777) 199MB classic
1.18/edge: v1.18.12 2020-11-14 (1807) 199MB classic
1.17/stable: v1.17.12 2020-09-25 (1701) 177MB classic
1.17/candidate: v1.17.14 2020-11-12 (1796) 177MB classic
1.17/beta: v1.17.14 2020-11-12 (1796) 177MB classic
1.17/edge: v1.17.14 2020-11-11 (1796) 177MB classic
1.16/stable: v1.16.15 2020-09-12 (1671) 179MB classic
1.16/candidate: v1.16.15 2020-09-04 (1671) 179MB classic
1.16/beta: v1.16.15 2020-09-04 (1671) 179MB classic
1.16/edge: v1.16.15 2020-09-02 (1671) 179MB classic
1.15/stable: v1.15.11 2020-03-27 (1301) 171MB classic
1.15/candidate: v1.15.11 2020-03-27 (1301) 171MB classic
1.15/beta: v1.15.11 2020-03-27 (1301) 171MB classic
1.15/edge: v1.15.11 2020-03-26 (1301) 171MB classic
1.14/stable: v1.14.10 2020-01-06 (1120) 217MB classic
1.14/candidate: ↑
1.14/beta: ↑
1.14/edge: v1.14.10 2020-03-26 (1303) 217MB classic
1.13/stable: v1.13.6 2019-06-06 (581) 237MB classic
1.13/candidate: ↑
1.13/beta: ↑
1.13/edge: ↑
1.12/stable: v1.12.9 2019-06-06 (612) 259MB classic
1.12/candidate: ↑
1.12/beta: ↑
1.12/edge: ↑
1.11/stable: v1.11.10 2019-05-10 (557) 258MB classic
1.11/candidate: ↑
1.11/beta: ↑
1.11/edge: ↑
1.10/stable: v1.10.13 2019-04-22 (546) 222MB classic
1.10/candidate: ↑
1.10/beta: ↑
1.10/edge: ↑
To install the latest stable version, simply run:
snap install microk8s --classic
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, 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.19/beta
is as simple as:
snap install microk8s --classic --channel=1.19/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 (eg1.19/edge
) holds the alpha upstream releases. - The
*/beta
channel (eg1.19/beta
) holds the beta upstream releases. - The
*/candidate
channel (eg1.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.18
release simply run:
sudo snap install microk8s --classic --channel=1.18/edge
However, be aware that pre-release versions may require you to configure the Kubernetes services on your own.
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.19/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 from 1.19 stable to the latest alpha:
sudo snap refresh microk8s --channel=1.19/edge
Caution: Changing the channel to a different series will almost certainly cause problems, as the configuration from the current version will be retained. If at all possible, it is recommended to re-install MicroK8s rather than refresh to a different channel, as it is not guaranteed to work.
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. 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
Snap documentation.
Last updated 3 months ago. Help improve this document in the forum.