elasticsearch-operator

module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2017 License: Apache-2.0

README

Elasticsearch Operator

CircleCI branch Docker Repository on Quay Go Report Card license

The code in this repo is based of the coreos/prometheus-operator.

Project status: alpha Not all planned features are completed. The API, spec, status and other user facing objects are subject to change. We do not support backward-compatibility for the alpha releases.

The Elasticsearch Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of Elasticsearch instances.

Once installed, the Elasticsearch Operator provides the following features:

  • Create/Destroy: Easily launch a Elasticsearch cluster for your Kubernetes namespace, a specific application or team easily using the Operator.

  • Simple Configuration: Configure the fundamentals of Elasticsearch like versions, persistence, and replicas from a native Kubernetes resource.

For an introduction to the Elasticsearch Operator, see the initial blog post.

The current project roadmap can be found here.

Prerequisites

Version >=0.0.1 of the Elasticsearch Operator requires a Kubernetes cluster of version >=1.5.0. If you are just starting out with the Elasticsearch Operator, it is highly recommended to use the latest version.

Third party resources

The Operator acts on the following third party resources (TPRs):

  • Elasticsearch, which defines a desired Elasticsearch cluster. The Operator ensures at all times that the specific resource definitions are running.

  • Curator, which defines a desired curator cronjob. The Operator ensures at all times that a cronjob matching the config and resource definition is running.

Installation

Install the Operator inside a cluster by running the following command:

kubectl apply -f bundle.yaml

Note: make sure to adapt the namespace in the ClusterRoleBinding if deploying in another namespace than the default namespace.

To run the Operator outside of a cluster:

make
hack/run-external.sh <kubectl cluster name>

Removal

To remove the operator and Elasticsearch, first delete any third party resources you created in each namespace. The operator will automatically shut down and remove Elasticsearch and ElasticsearchCluster pods and Curator cronjobs, and associated configmaps.

for n in $(kubectl get namespaces -o jsonpath={..metadata.name}); do
  kubectl delete --all --namespace=$n elasticsearch
  kubectl delete --all --namespace=$n curator
done

After a couple of minutes you can go ahead and remove the operator itself.

kubectl delete -f bundle.yaml

The operator automatically creates services in each namespace where you created a Elasticsearch resources, and defines three third party resources. You can clean these up now.

for n in $(kubectl get namespaces -o jsonpath={..metadata.name}); do
  kubectl delete --ignore-not-found --namespace=$n service elasticsearch-operated
done

kubectl delete --ignore-not-found thirdpartyresource \
  curator.elasticsearch.zerbytes.net \
  elasticsearch.elasticsearch.zerbytes.net \

The Elasticsearch Operator collects anonymous usage statistics to help us learning how the software is being used and how we can improve it. To disable collection, run the Operator with the flag -analytics=false

Directories

Path Synopsis
cmd
pkg
api
third_party
workqueue
Package workqueue provides a simple queue that supports the following features:
Package workqueue provides a simple queue that supports the following features:

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL