Skip to content

Kubernetes operator for Indices, Index Templates, Roles, Users and other Elasticsearch and Kibana related resources.

License

Notifications You must be signed in to change notification settings

husnialhamdani/eck-custom-resources

 
 

Repository files navigation

Custom resources for ECK

docker-publish helm-publish

Kubernetes operator that enables the installation of various resources for Elasticsearch and Kibana.

Currently supported resources:

Installation

# Add eck-custom-resources helm repo
helm repo add eck-custom-resources https://xco-sk.github.io/eck-custom-resources/

# Install chart
helm install eck-cr eck-custom-resources/eck-custom-resources-operator

Configuration options are documented in chart README file

Upgrade guide

From 0.6.0 to 0.7.0

There is a new ComponentTemplate CRD present. To apply the CRD, run:

kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/v0.7.0/config/crd/bases/es.eck.github.com_componenttemplates.yaml

From 0.5.0 to 0.6.0

The Elasticsearch API Key support was introduced. To apply the CRD, run:

kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/v0.6.0/config/crd/bases/es.eck.github.com_elasticsearchapikeys.yaml

From 0.4.1 to 0.5.0

The Multi-target support was introduced. This changes is backward compatible, but in order to make use of the multi-target support apply the new CRDs manually:


kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/es.eck.github.com_elasticsearchinstances.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/es.eck.github.com_elasticsearchroles.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/es.eck.github.com_elasticsearchusers.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/es.eck.github.com_indexlifecyclepolicies.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/es.eck.github.com_indextemplates.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/es.eck.github.com_indices.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/es.eck.github.com_ingestpipelines.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/es.eck.github.com_snapshotlifecyclepolicies.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/es.eck.github.com_snapshotrepositories.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/kibana.eck.github.com_kibanainstances.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/kibana.eck.github.com_dashboards.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/kibana.eck.github.com_indexpatterns.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/kibana.eck.github.com_lens.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/kibana.eck.github.com_savedsearches.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/kibana.eck.github.com_spaces.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/kibana.eck.github.com_visualizations.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.5.0/config/crd/bases/kibana.eck.github.com_dataviews.yaml

There are 2 new CRDs, ElasticsearchInstance and KibanaInstance that allows you to deploy the target configuration for both Kibana and Elasticsearch. The rest of the CRDs were extended with optional spec.targetInstance.name field, that should reference the ElasticsearchInstance/KibanaInstance. If targetInstance field is not present, the default operator configuration (elasticsearch and kibana fields) is used. This approach should ensure the backward compatibility with previously deployed CRDs. See samples.

From 0.3.2 to 0.4.1

There is new DataView CRD present. To apply the CRD, run:

kubectl apply --server-side -f https://raw.githubusercontent.com/xco-sk/eck-custom-resources/eck-custom-resources-operator-0.4.1/config/crd/bases/kibana.eck.github.com_dataviews.yaml

Uninstallation

To uninstall the eck-cr from Kubernetes cluster, run:

helm uninstall eck-cr

This removes all resources related to eck-custom-resources operator. It won't remove the CRDs nor any deployed custom resource (e.g. Index, Index Template ...), they will remain in K8s and also in Elasticsearch.

Working with custom resources

After the operator is installed, you can deploy Elasticsearch/Kibana resources from the list above. The reconciler will take care of propagating the change to Elasticsearch or Kibana, whether it is creation of new resource, deletion or update. Definition of target Elasticsearch/Kibana is done using Elasticsearch Instance and Kibana Instance resources. These are then referenced (by name) from other resources through spec.targetInstance.name field.

For detailed documentation for each resource, see List of supported resources

Help and Troubleshooting

In case you need help or found a bug, please create an Issue on Github.

License

Licensed under the Apache License, Version 2.0; see LICENSE.md

About

Kubernetes operator for Indices, Index Templates, Roles, Users and other Elasticsearch and Kibana related resources.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 78.0%
  • Java 13.1%
  • Makefile 3.8%
  • Gherkin 3.7%
  • Other 1.4%