I am trying to move my Springboot App with Elasticsearch to run on minikube. But I would like to reuse the existing indexes which I created using local elastic search in the elastic search which runs on the Kubernetes.
I could see some documents about Persistent Volume but I could not find any info about reusing the existing index on the local directory.
Could someone please suggest some info about how to mount existing local directory which contains Elasticsearch indices on Kubernetes.
I am trying to run the Kubernetes cluster locally using minikube. This is my first try with Kubernetes. Therefore, I am not familiar with all aspects of it. I am trying to deploy a spring boot app which connects to Elasticsearch server.
Elasticsearch Server - deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: elasticsearch
spec:
selector:
matchLabels:
run: elasticsearch
replicas: 1
template:
metadata:
labels:
run: elasticsearch
spec:
containers:
- image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
name: elasticsearch
imagePullPolicy: IfNotPresent
env:
- name: discovery.type
value: single-node
- name: cluster.name
value: elasticsearch
ports:
- containerPort: 9300
name: nodes
- containerPort: 9200
name: client