# Deploying elasticsearch cluster on kubernetes issue

**URL:** <https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [December 12, 2020, 12:21pm UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474 "2020-12-12T12:21:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [December 12, 2020, 12:21pm UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/1 "2020-12-12T12:21:54Z")

</div>

Hello,

I am trying to deploy elasticsearch 7.7.1 on kubernetes into a 3 node cluster. I have tried following the documentation for it and when I run `kubectl apply -f <manifestfile>.yaml` I am getting the following error:

`error: unable to recognize "<manifestfile>.yaml": no matches for kind "Elasticsearch" in version "elasticsearch.k8s.elastic.co/v1"`

the yaml file looks like this:

```auto
---
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch
spec:
  baseImage: registry/elasticsearch
  tag: v7.7.1
  version: 7.7.1
  nodeSets:
  - name: default
    count: 3
    config:
      node.master: true
      node.data: true
      node.store.allow_mmap: true
    podTemplate:
      metadata:
        labels:
          app: elasticsearch
      spec:
        containers:
        - name: elasticsearch
          image: registry/elasticsearch:v7.7.1
          env:
          - name: ES_JAVA_OPTS
            values: -Xms4g -Xmx4g
          resources:
            requests:
            memory: 4Gi
            cpu: 1
          limits:
            memory: 5Gi
          volumeMounts:
        - name: es-storage
          mountPath: /var/lib/elasticsearch
        volumes:
        - name: es-local-claim
          persistentVolumeClaim:
            claimName: es-storage

```

Any idea what I am doing wrong?

---

<div class="post-metadata">

**Author:** ![Jose\_Angel\_Morena\_Si](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jose_angel_morena_si/32/76522_2.png) [@Jose\_Angel\_Morena\_Si](https://discuss.elastic.co/u/Jose_Angel_Morena_Si)\
**Post date:** [December 12, 2020, 4:40pm UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/2 "2020-12-12T16:40:29Z")

</div>

I am not expert because I have never deployed Elasticsearch in k8s.

Nevertheless, it appears you may have missed some step in your deployment procedure. Kubernetes api complains about not being able to recognise the kind "Elasticsearch".

I suppose this happens because there has not been any CRDs created specifying this kind Elasticsearch.

My piece of advice, be sure you are not missing any step before creating the Elasticsearch object. Besides, could you share please the steps you are following to deploy Elasticsearch in kubernetes?

Hope it helps,

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [December 12, 2020, 5:42pm UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/3 "2020-12-12T17:42:26Z")

</div>

The quickstart documentation does not say anything about CRD's see [https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html)

---

<div class="post-metadata">

**Author:** ![Jose\_Angel\_Morena\_Si](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jose_angel_morena_si/32/76522_2.png) [@Jose\_Angel\_Morena\_Si](https://discuss.elastic.co/u/Jose_Angel_Morena_Si)\
**Post date:** [December 12, 2020, 6:02pm UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/4 "2020-12-12T18:02:21Z")

</div>

I think you have to deploy the operator first. Did u do it?

> **[Deploy ECK in your Kubernetes cluster | Elastic Cloud on Kubernetes \[1.3\] |...](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-eck.html)**

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [December 12, 2020, 6:08pm UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/5 "2020-12-12T18:08:45Z")

</div>

Great I have installed it via HELM and it's crashing because arm64 is not supported.

---

<div class="post-metadata">

**Author:** ![Jose\_Angel\_Morena\_Si](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jose_angel_morena_si/32/76522_2.png) [@Jose\_Angel\_Morena\_Si](https://discuss.elastic.co/u/Jose_Angel_Morena_Si)\
**Post date:** [December 12, 2020, 6:25pm UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/6 "2020-12-12T18:25:20Z")

</div>

In the container registry of elastic there seems to be images arm64 compatible. Maybe you can deploy elasticsearch (if you dont want the whole stack nor ECK), running in k8s.

> **[elasticsearch/elasticsearch | Docker @ Elastic](https://www.docker.elastic.co/r/elasticsearch/elasticsearch)**

You could create a Deployment out of one of these images, configure its storage and inject the config with a ConfigMap.

Hope it helps,

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [December 12, 2020, 6:36pm UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/7 "2020-12-12T18:36:06Z")

</div>

Let's say I create a 3 node cluster using deployemnts and `replica:3`. how will I make those tree pods talk to eachother

---

<div class="post-metadata">

**Author:** ![Jose\_Angel\_Morena\_Si](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jose_angel_morena_si/32/76522_2.png) [@Jose\_Angel\_Morena\_Si](https://discuss.elastic.co/u/Jose_Angel_Morena_Si)\
**Post date:** [December 12, 2020, 6:41pm UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/8 "2020-12-12T18:41:10Z")

</div>

I suppose that the best approach would be three different StatefulSets for each Elasticsearch pod, if you prefer it can be Deployments, instead.  
Expose each Deployment and then make sure Service object uses ports 9200 and 9300. If you do not have 9300 cluster communication is not going to work.  
Each of the pods is going to have a different PVC mounted in /var/lib/elasticsearch.

I think this is the best way to proceed, bearing in mind Elasticsearch is a Stateful application.

---

<div class="post-metadata">

**Author:** ![zozo6015](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zozo6015/32/12117_2.png) [@zozo6015](https://discuss.elastic.co/u/zozo6015)\
**Post date:** [December 13, 2020, 10:24am UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/9 "2020-12-13T10:24:44Z")

</div>

In fact I needed arm/v7 which it isn't. I am guessing I am about to build my own docker images for that architecture.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 10, 2021, 10:24am UTC](https://discuss.elastic.co/t/deploying-elasticsearch-cluster-on-kubernetes-issue/258474/10 "2021-01-10T10:24:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
