Git Product home page Git Product logo

microk8s's Introduction

MicroK8s

Build Status

Kubernetes in a snap that you can run locally.

You can install MicroK8s with the latest stable upstream Kubernetes release with:

snap install microk8s --classic

For more information on using MicroK8s see the official docs.

Building from source

To build the snap you need a working LXD installation. To install LXD on Ubuntu first remove any old packages:

sudo apt-get purge lxc*
sudo apt-get purge lxd*

Get the latest LXD and configure it with:

sudo snap install lxd
lxd init --auto

Build MicroK8s with:

git clone https://github.com/ubuntu/microk8s
cd microk8s
snapcraft cleanbuild

Building for specific versions

To produce a custome build with specific component versions we need to prepare an LXC container with Ubuntu 16:04 and snapcraft:

lxc launch ubuntu:16.04 --ephemeral test-build
lxc exec test-build -- snap install snapcraft --classic
lxc exec test-build -- apt update
lxc exec test-build -- git clone https://github.com/ubuntu/microk8s

We can then set the following environment variables prior to building:

  • KUBE_VERSION: kubernetes release to package. Defaults to latest stable.
  • ETCD_VERSION: version of etcd. Defaults to v3.3.4.
  • CNI_VERSION: version of CNI tools. Defaults to v0.7.1.
  • KUBE_TRACK: kubernetes release series (e.g., 1.10) to package. Defaults to latest stable.
  • ISTIO_VERSION: istio release. Defaults to v1.0.5.
  • KNATIVE_SERVING_VERSION: Knative Serving release. Defaults to v0.6.0.
  • KNATIVE_BUILD_VERSION: Knative Build release. Defaults to v0.5.0.
  • KNATIVE_EVENTING_VERSION: Knative Eventing release. Defaults to v0.5.0.
  • RUNC_COMMIT: the commit hash from which to build runc
  • CONTAINERD_COMMIT: the commit hash from which to build containerd

For building we use snapcraft (not snapcraft cleanbuild) and we prepend and variables we need. For example to build the MicroK8s snap for Kubernetes v1.9.6 we:

lxc exec test-build -- sh -c "cd microk8s && KUBE_VERSION=v1.9.6 snapcraft"

The produced snap is inside the ephemeral LXC container, we need to copy it to the host:

lxc file pull test-build/root/microk8s/microk8s_v1.9.6_amd64.snap .

Installing the snap

snap install microk8s_latest_amd64.snap --classic --dangerous

Who's Using MicroK8s

Check out the "MicroK8s In The Wild" page to see some interesting use cases.

microk8s's People

Contributors

adamisrael avatar akaihola avatar balchua avatar c16a avatar cassid4 avatar clpo13 avatar cmars avatar darabos avatar davefinster avatar evilnick avatar javacruft avatar jimpatterson avatar joestringer avatar johnsca avatar jorritsalverda avatar keshavdv avatar klarose avatar ktsakalozos avatar kwmonroe avatar lhotari avatar lleontop avatar magne avatar marcoceppi avatar miguelgarcia avatar niklasholm avatar olatheander avatar pesimon avatar slurms avatar tvansteenburgh avatar wichert avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.