<p>I am following this doc <a href="https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-deploy-elasticsearch.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-deploy-elasticsearch.html</a> to deploy Elasticsearch on Kuberenete. I have created the spec file:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 7.15.0
  nodeSets:
  - name: default
    count: 1
    config:
      node.store.allow_mmap: false
</code></pre>
<p>But I got an error when run <code>kubectl apply -f es.yml</code>:</p>
<pre><code> no matches for kind &quot;Elasticsearch&quot; in version &quot;elasticsearch.k8s.elastic.co/v1&quot;
</code></pre>
<p>what should I do to solve the issue? It seems K8S doesn't know this kind <code>Elasticsearch</code>. Do I need to install anything?</p>

Joey Yi Zhao
<p>it looks like you may have omitted to install the <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/" rel="nofollow noreferrer">custom resource definition (CRD)</a> for elastic.</p>
<p><code>Kubectl</code> version 1.16 and above:</p>
<pre><code>kubectl create -f https://download.elastic.co/downloads/eck/1.8.0/crds.yaml
kubectl apply -f https://download.elastic.co/downloads/eck/1.8.0/operator.yaml
</code></pre>
<p><code>Kubectl</code> version below 1.16:</p>
<pre><code>kubectl create -f https://download.elastic.co/downloads/eck/1.8.0/crds-legacy.yaml
kubectl apply -f https://download.elastic.co/downloads/eck/1.8.0/operator-legacy.y
</code></pre>
