Microk8s is a simplest way to launch single node kubernetes environment for testing and learning perposes any devops. This is fast, small, cheap k8s for CI/CD.

snaps are software bundles come with all it’s dependencies. They update automatically and roll back gracefully. Snaps are discoverable and installable from snap store.

Install snap in linux dabians.

Install microk8s.

Following url is the user guide for micro k8s.

At any point you can check MicroK8s’ availability with:

To avoid colliding with a already installed and to avoid overwriting any existing Kubernetes configuration file, MicroK8s adds a command, configured to exclusively access the new MicroK8s install. When following instructions online, make sure to prefix with .

If you do not already have a version of installed you can alias to using the following command:

This measure can be safely reverted at any time by running:

Kubernetes add-ons

MicroK8s installs a barebones upstream Kubernetes. This means just the , , , , , are installed and run. Additional services like and can be run using the command.

These add-ons can be disabled at anytime using the command

List of available add-ons

  • dns: Deploy CoreDNS. This add-on may be required by others thus we recommend you always enable it. In environments where the external dns servers and are blocked you will need to update the upstream dns servers in after enabling the add-on.
  • dashboard: Deploy Kubernetes dashboard as well as Grafana and InfluxDB. To access Grafana point your browser to the url reported by . Access the dashboard with the default token found with and .
  • storage: Create a default storage class. This storage class makes use of the hostpath-provisioner pointing to a directory on the host. Persistent volumes are created under . Upon disabling this add-on you will be asked if you want to delete the persistent volumes created.
  • ingress: Create an ingress controller.
  • gpu: Expose GPU(s) to MicroK8s by enabling the nvidia runtime and nvidia-device-plugin-daemonset. Requires NVIDIA drivers to be already installed on the host system.
  • istio: Deploy the core Istio services. You can use the command to manage your deployments.
  • registry: Deploy a private image registry and expose it on . The storage add-on will be enabled as part of this add-on. See the registry documentation for more details.
  • metrics-server: Deploy the Metrics Server.
  • prometheus: Deploy the Prometheus Operator v0.25.
  • fluentd: Deploy the Elasticsearch-Kibana-Fluentd logging and monitoring solution.
  • jaeger: Deploy the Jaeger Operator v1.8.2 in the “simplest” configuration.
  • linkerd: Deploy linkerd2 Linkerd service mesh. By default proxy auto inject is not enabled. To enable auto proxy injection, simply use . If you need to pass more arguments, separate them with and enclose the addons plus arguments with double quotes. For example: . Use command to interact with Linkerd.
  • rbac: Enable RBAC (Role-Based Access Control) authorisation mode. Note that other add-ons may not work with RBAC enabled.
  • knative: Enable Knative with .

How to use istilo with microk8s

Configuring MicroK8s services

The following systemd services will be running in your system:

  • snap.microk8s.daemon-apiserver, is the kube-apiserver daemon started using the arguments in
  • snap.microk8s.daemon-controller-manager, is the kube-controller-manager daemon started using the arguments in
  • snap.microk8s.daemon-scheduler, is the kube-scheduler daemon started using the arguments in
  • snap.microk8s.daemon-kubelet, is the kubelet daemon started using the arguments in
  • snap.microk8s.daemon-proxy, is the kube-proxy daemon started using the arguments in
  • snap.microk8s.daemon-containerd, is the containerd daemon started using the configuration in and .
  • snap.microk8s.daemon-etcd, is the etcd daemon started using the arguments in

Normally, points to .

To reconfigure a service you will need to edit the corresponding file and then restart the respective daemon. For example:

Stopping and restarting MicroK8s

You may wish to temporarily shutdown MicroK8s when not in use without un-installing it.

MicroK8s can be shutdown with:

MicroK8s can be restarted later with:

Before removing MicroK8s, use to stop all running pods.

Following url describe both minikube and microk8s clearly.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store