Config the Addon to Use Custom Registries and Images

If you have trouble to access default images, or want to use images from a private registry or local version, you could achieve this by flag --images and --registries.

We defined and named all images used by an addon, you could view them by command addons images:

  1. minikube addons images efk
  1. efk has following images:
  2. |----------------------|------------------------------|-------------------|
  3. | IMAGE NAME | DEFAULT IMAGE | DEFAULT REGISTRY |
  4. |----------------------|------------------------------|-------------------|
  5. | Elasticsearch | elasticsearch:v5.6.2 | k8s.gcr.io |
  6. | FluentdElasticsearch | fluentd-elasticsearch:v2.0.2 | k8s.gcr.io |
  7. | Alpine | alpine:3.6 | |
  8. | Kibana | kibana/kibana:5.6.2 | docker.elastic.co |
  9. |----------------------|------------------------------|-------------------|

The DEFAULT IMAGE and DEFAULT REGISTRY columns indicate which images are used by default. An empty registry means the image is stored locally or default registry docker.io.

The IMAGE NAME column is used to customize the corresponding image and registry.

Assume we have a private registry at 192.168.10.2:5555 to replace k8s.gcr.io and a locally built Kibana called kibana/kibana:5.6.2-custom.

We could load local images to minikube by:

  1. minikube cache add kibana/kibana:5.6.2-custom

Then we can start efk addon with flags --images and --registries. The format is IMAGE_NAME=CUSTOM_VALUE, separated by commas, where the IMAGE_NAME is the value of IMAGE NAME column in the table above.

  1. minikube addons enable efk --images="Kibana=kibana/kibana:5.6.2-custom" --registries="Kibana=,Elasticsearch=192.168.10.2:5555,FluentdElasticsearch=192.168.10.2:5555"
  1. Using image 192.168.10.2:5555/elasticsearch:v5.6.2
  2. Using image 192.168.10.2:5555/fluentd-elasticsearch:v2.0.2
  3. Using image alpine:3.6
  4. Using image kibana/kibana:5.6.2-custom
  5. 🌟 The 'efk' addon is enabled

Now the efk addon is using the custom registry and images.

Last modified January 27, 2021: Generate docs, update addon example registry (79cb6b42c)