MicroK8s quick start guide

The smallest, fastest, fully-conformant Kubernetes that tracks upstream releases and makes clustering trivial. MicroK8s is great for offline development, prototyping, and testing. Use it on a VM as a small, cheap, reliable k8s for CI/CD. The best Kubernetes for appliances. Develop IoT apps for k8s and deploy them to MicroK8s on your Linux boxes.

What you’ll need

  • An Ubuntu 18.04 LTS or 16.04 LTS environment to run the commands (or another operating system which supports snapd - see the snapd documentation)
  • At least 20G of disk space and 4G of memory are recommended
  • An internet connection

Note: If you don’t meet these requirements, there are additional ways of installing MicroK8s, including additional OS support and an offline deploy. See the alternative install page for details.

  1. 1Install MicroK8s

    MicroK8s will install a minimal, lightweight Kubernetes you can run and use on practically any machine. It can be installed with a snap:

    More about setting the channel ›

  2. 2Join the group

    MicroK8s creates a group to enable seamless usage of commands which require admin privilege. To add your current user to the group and gain access to the .kube caching directory, run the following two commands:
    You will also need to re-enter the session for the group update to take place:
  3. 3Check the status

    MicroK8s has a built-in command to display its status. During installation you can use the --wait-ready flag to wait for the Kubernetes services to initialise:
  4. 4Access Kubernetes

    MicroK8s bundles its own version of kubectl for accessing Kubernetes. Use it to run commands to monitor and control your Kubernetes. For example, to view your node:

    … or to see the running services:

    MicroK8s uses a namespaced kubectl command to prevent conflicts with any existing installs of kubectl. If you don't have an existing install, it is easier to add an alias (append to ~/.bash_aliases) like this:

  5. 5Deploy an app

    Of course, Kubernetes is meant for deploying apps and services. You can use the kubectl command to do that as with any Kuberenetes. Try installing a demo app:

    It may take a minute or two to install, but you can check the status:

  6. 6Use add-ons

    MicroK8s uses the minimum of components for a pure, lightweight Kubernetes. However, plenty of extra features are available with a few keystrokes using "add-ons" – pre-packaged components that will provide extra capabilities for your Kubernetes, from simple DNS management to machine learning with Kubeflow!

    To start it is recommended to add DNS management to facilitate communication between services. For applications which need storage, the 'storage' add-on provides directory space on the host. These are easy to set up:

    See the full list of addons ›

  7. 7Starting and Stopping MicroK8s

    MicroK8s will continue running until you decide to stop it. You can stop and start MicroK8s with these simple commands:

    ... will stop MicroK8s and its services. You can start again any time by running:

Next steps

We appreciate your feedback on the docs. You can edit this page or file a bug here.