elastic / cloud-on-k8s

Elastic Cloud on Kubernetes
Other
68 stars 708 forks source link

Add CRDs installation prerequisites to the “Elastic Stack Helm Chart” article #8052

Open NeroBlackstone opened 2 months ago

NeroBlackstone commented 2 months ago

I'm new to cloud-on-k8s, and I want to Installing Logstash along with Elasticsearch, Kibana and Beats using the eck-stack Helm Chart , I follow instructions from this page and I got a error:

helm install eck-stack-with-logstash elastic/eck-stack \
    --values https://raw.githubusercontent.com/elastic/cloud-on-k8s/2.14/deploy/eck-stack/examples/logstash/basic-eck.yaml -n elastic-stack
#Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "eck-stack-with-logstash-eck-beats" namespace: "" from "": no matches for kind "Beat" in version "beat.k8s.elastic.co/v1beta1"
#ensure CRDs are installed first, resource mapping not found for name: "elasticsearch" namespace: "" from "": no matches for kind "Elasticsearch" in version "elasticsearch.k8s.elastic.co/v1"
#ensure CRDs are installed first, resource mapping not found for name: "eck-stack-with-logstash-eck-kibana" namespace: "" from "": no matches for kind "Kibana" in version "kibana.k8s.elastic.co/v1"
#ensure CRDs are installed first, resource mapping not found for name: "logstash-ls-beats" namespace: "" from "": no matches for kind "Logstash" in version "logstash.k8s.elastic.co/v1alpha1"
#ensure CRDs are installed first]

Then I install custom resource definitions:

kubectl create -f https://download.elastic.co/downloads/eck/2.14.0/crds.yaml

and Install the operator with its RBAC rules:

kubectl apply -f https://download.elastic.co/downloads/eck/2.14.0/operator.yaml

then every thing worked.

So, I think this “Elastic Stack Helm Chart” article miss section about how to install custom resource definitions and operator.

If this is necessary, I am willing to open a PR to add this part, thank you

barkbay commented 2 months ago

Yes, this section assumes that the operator has been already installed: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-installing-eck.html

Maybe we can add a note to make this more explicit.