I am planning to migrate ELK stake to ECK stake in kubernetes.
But I want to use same PVC (master/data) created earlier by Elasticsearch in ELK in Elasticsearch created by ECK Operator.
In my helm release of eck-elasticsearch, I have mentioned selector-matchLabels of old PVC. But new elasticsearch pod still creating new PVC in eck elasticsearch.
How I can achieve required schenario to avoid data loss in adapting ECK Cluster?
########
volumeClaimTemplates:
- metadata:
name: elasticsearch-master
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
selector:
matchLabels:
app: elasticsearch-master
#############
Pods was in ELK Cluster : elasticsearch-master-0 , elasticsearch-master-1 , elasticsearch-master-2
Pods created in ECK Cluster : elasticsearch-es-master-0 , elasticsearch-es-master-1 , elasticsearch-es-master-2
PVC Created:
In ECK:
elasticsearch-master-elasticsearch-es-master-0
elasticsearch-master-elasticsearch-es-master-1
elasticsearch-master-elasticsearch-es-master-2
Old PVC from ELK, which to be attached to elasticsearch-es-master-0 , elasticsearch-es-master-1 , elasticsearch-es-master-2.
elasticsearch-master-elasticsearch-master-0
elasticsearch-master-elasticsearch-master-1
elasticsearch-master-elasticsearch-master-2