You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/custom-images.asciidoc
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,39 +6,40 @@ endif::[]
6
6
[id="{p}-custom-images"]
7
7
== Creating custom images
8
8
9
-
It is possible to create your own custom Elasticsearch (or Kibana, etc.) image instead of using the base image provided by Elastic. You might want to do this to preload plugins in the image rather than having to link:k8s-init-containers-plugin-downloads.html[install them via init container] each time a pod starts. Note that you must use the official image as the base for it to function properly. For example, if you want to create an Elasticsearch 7.3.2 image with the https://www.elastic.co/guide/en/elasticsearch/plugins/master/repository-gcs.html[Google Cloud Storage Repository Plugin], you could create a `Dockerfile` containing:
9
+
You can create your own custom Elasticsearch or Kibanaimage instead of using the base image provided by Elastic. You might want to do this to preload plugins in the image rather than having to link:k8s-init-containers-plugin-downloads.html[install them via init container] each time a pod starts. To do this, you must use the official image as the base for it to function properly. For example, if you want to create an Elasticsearch 7.3.2 image with the https://www.elastic.co/guide/en/elasticsearch/plugins/master/repository-gcs.html[Google Cloud Storage Repository Plugin], you can do the following:
10
10
11
+
. Create a `Dockerfile` containing:
12
+
+
11
13
----
12
14
FROM docker.elastic.co/elasticsearch/elasticsearch:7.3.2
13
15
RUN bin/elasticsearch-plugin install --batch repository-gcs
14
16
----
15
17
16
-
Build the image with:
17
-
18
+
. Build the image with:
19
+
+
18
20
----
19
-
docker build --tag elasticsearch-gcs:7.3.2 .
21
+
docker build --tag elasticsearch-gcs:7.3.2
20
22
----
21
23
22
-
There are various hosting options for your images. If you use Google Kubernetes Engine, it is automatically configured to use the Google Container Registry (see https://cloud.google.com/container-registry/docs/using-with-google-cloud-platform#google-kubernetes-engine[here] for more information). To use the image, you could then https://cloud.google.com/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry[push to the registry] with:
24
+
There are various hosting options for your images. If you use Google Kubernetes Engine, it is automatically configured to use the Google Container Registry (see https://cloud.google.com/container-registry/docs/using-with-google-cloud-platform#google-kubernetes-engine[here] for more information). To use the image, you can then https://cloud.google.com/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry[push to the registry] with:
23
25
24
26
----
25
27
docker tag elasticsearch-gcs:7.3.2 gcr.io/$PROJECT-ID/elasticsearch-gcs:7.3.2
Configure your Elasticsearch spec to use the newly pushed image, for example:
32
+
Configure your Elasticsearch specification to use the newly pushed image, for example:
31
33
32
34
[source,yaml]
33
35
----
34
36
spec:
35
37
image: gcr.io/$PROJECT-ID/elasticsearch-gcs:7.3.2
36
38
----
37
39
38
-
The steps are similar for https://docs.microsoft.com/en-us/azure/aks/tutorial-kubernetes-prepare-acr[Azure Kubernetes Service] and AWS's https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-basics.html#use-ecr[Elastic Container Registry].
40
+
The steps are similar for https://docs.microsoft.com/en-us/azure/aks/tutorial-kubernetes-prepare-acr[Azure Kubernetes Service] and https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-basics.html#use-ecr[AWS Elastic Container Registry].
39
41
40
-
[id="{p}-references"]
41
-
=== References
42
+
For more information, you can check the following references:
42
43
43
44
- https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_c_customized_image[Elasticsearch doc on creating custom images]
0 commit comments