Skip to content

rahulkrishnanfs/kubernetes-elasticsearch

Repository files navigation

kubernetes-elasticsearch

Kubernetes configuration for elasticsearch cluster

Follow me on alt text

Usage

  1. Create elasticsearch master pod which has elasticsearch-master container.
    $kubectl create -f es-master.yml
  1. Create K8s service resource named elasticsearch with external cloud provider Loadbalancer. This is not recommented for the production. You can use this to test indices in the elaticsearch and the node status.
    $kubectl create -f es-master-svc.yml
  1. Create the slave node to include in the cluster. Check the status of the master and slave node with the help of following url.
    http://< serverip >:9200/_cat/nodes
  1. Create a Deployment resource named elasticsearch-client with container named elasticsearch-client. This will be added as a slave node in the cluster.
    kubectl create -f es-client.yml
  1. Create a K8s service named elastic-discovery with port 9300 port for syncing the cluster
   kubectl create -f es-master-client-svc.yml
  1. Create a service named elasticsearch-internal, so that services can make use of elasticsearch cluster. This service is not exposing to the outside world .
    kubectl create -f es-master-internal-svc.yml
  1. This will create a pod to store data in the elasticsearch cluster with the help of Statefulsets kubernetes resource.
    kubectl create -f es-date-statefulset.yml

'o' output

'o' output

Useful kubectl commands to check the status of the ELF cluster

 $kubectl get pods --namespace=< namespace  >
 $kubectl get deployments
 $kubectl get services
 $kubectl get statefulsets

##Create a PR if you find any issue. I would welcome you to contribute to this project fast developent

About

Kubernetes configuration for elasticsearch cluster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published