What is a minikube Add-On?

5/14/2021

I've worked through my first Kubernetes tutorial.

Near the end, this tutorial introduced the concept of "add-ons" -- for example, you can install the metrics-server add-on by running

$ minikube addons enable metrics-server

What are these add-ons? Are they a feature that's specifically related to minikube, or can they be used with any kubernetes cluster and minikube addons is just some syntactic sugar that points at some shell scripts that can do anything?

Put another way -- what is happening behind the scenes when I run

$ minikube addons enable some-add-on

Are all add-ons enabled the same way (like, maybe they create a deployment?) -- or will different add-ons be installed in different ways depending on their functionality?

I'm basically trying to understand how a programmer could extend kubernetes themselves. When I go looking for documentation on this I find either lists of add-ons I can use (which point to add-ons being more than a minikube thing), or very broad documentation on ways to extend kubernetes that don't make any mention of "add-ons" by name.

-- Alan Storm
kubernetes
minikube

1 Answer

5/14/2021

What are these add-ons? Are they a feature that's specifically related to minikube

Yes, this is specific to Minikube.

Kubernetes is manly a container orchestrator. It is typically installed in an environment with lots of servers, e.g. a Cloud Provider like AWS or GCP. Kubernetes does not work isolated, it has abstractions and need real infrastructure from outside.

Some examples:

  • Load Balancer were your app traffic arrives through
  • Virtual Machine or Physical Machines to e.g scale out your cluster with more Nodes when you want autoscaling.
  • Disk volumes, either local volumes on the node, or storage via a network protocol.

In a cloud environment like e.g. Amazon Web Services, these things would be provided with other AWS services like e.g. Elastic Load Balancer, EC2 virtual machines or Elastic Block Storage. Other providers like e.g. RedHat OpenShift, specialized on Kubernetes for on-prem environments has other ways to provide these resources, e.g. via VMWare vSphere

Minikube is specialized for running Kubernetes on your local machine and to allow you use Kubernetes as how it would appear in a environment with many servers, it need to mimic those features, e.g. use your local machine for Persistent Volumes.

You can see the Minikube add-ons with this command:

minikube addons list
-- Jonas
Source: StackOverflow