Custom add-on - can I add my own add-ons?

I am planning to use microk8s on an IoT / Edge device running ubuntu 18.04 core in order to run edge services that interact with the device and stream data to the cloud. I am trying to figure out a provisioning model for the device whereby I can install microk8s and my services into it. So far my plan is to Netboot the devices when they come online and install a prebuilt image with Ubuntu 18.04 core, microk8s snap (preconfigured with add-ons) and an electron ui snap.

I would like to package my services into the microk8s snap as custom add-ons so that I don’t have to install using kubectl manifests or helm. Is that possible?

Hi @Ryan_Stinson the way to go about that is to build MicroK8s snap. Here’s a link on how to build it.

To utilize the command microk8s enable <your addon name>, you have to do the following.

  • Create a file named enable-<your addon>.sh
  • In the addon list file, you add your addon in there.
  • Finally when you want to install it, you need to do it like this sudo snap install <your custom microk8s snap> --classic --dangerous.

Once you have all the snap file, i think you may also include the snap file into your iso image.

One point to remember, this snap will not get updates from the snap store.

Excellent @balchua1! That’s what I needed.