Loading

Install ECK using the YAML manifests

ECK

In this guide, you'll learn how to deploy ECK using Elastic-provided YAML manifests. This method is the quickest way to get started with ECK if you have full administrative access to the Kubernetes cluster.

To learn about other installation methods, refer to Install ECK.

During the installation, the following components are installed or updated:

  • CustomResourceDefinition objects for all supported resource types (Elasticsearch, Kibana, APM Server, Beats, Elastic Agent, Elastic Maps Server, and Logstash).
  • Namespace named elastic-system to hold all operator resources.
  • ServiceAccount, ClusterRole and ClusterRoleBinding to allow the operator to manage resources throughout the cluster.
  • ValidatingWebhookConfiguration to validate Elastic custom resources on admission.
  • StatefulSet, ConfigMap, Secret and Service in elastic-system namespace to run the operator application.

Before you begin, review the following prerequisites and recommendations:

  • You're running a Kubernetes cluster using a supported platform.

  • If you are using GKE, make sure your user has cluster-admin permissions. For more information, check Prerequisites for using Kubernetes RBAC on GKE.

  • If you are using Amazon EKS, make sure the Kubernetes control plane is allowed to communicate with the Kubernetes nodes on port 443. This is required for communication with the validating webhook. For more information, check Recommended inbound traffic.

To deploy the ECK operator:

  1. Install Elastic's custom resource definitions with create:

    kubectl create -f https://download.elastic.co/downloads/eck/{{eck_version}}/crds.yaml
    

    You'll see output similar to the following as resources are created:

    customresourcedefinition.apiextensions.k8s.io/agents.agent.k8s.elastic.co created
    customresourcedefinition.apiextensions.k8s.io/apmservers.apm.k8s.elastic.co created
    customresourcedefinition.apiextensions.k8s.io/beats.beat.k8s.elastic.co created
    customresourcedefinition.apiextensions.k8s.io/elasticmapsservers.maps.k8s.elastic.co created
    customresourcedefinition.apiextensions.k8s.io/elasticsearches.elasticsearch.k8s.elastic.co created
    customresourcedefinition.apiextensions.k8s.io/enterprisesearches.enterprisesearch.k8s.elastic.co created
    customresourcedefinition.apiextensions.k8s.io/kibanas.kibana.k8s.elastic.co created
    customresourcedefinition.apiextensions.k8s.io/logstashes.logstash.k8s.elastic.co created
    
  2. Using kubectl apply, install the operator with its RBAC rules:

    kubectl apply -f https://download.elastic.co/downloads/eck/{{eck_version}}/operator.yaml
    
    Note

    The ECK operator runs by default in the elastic-system namespace. While this namespace is used for the operator itself, it is recommended that you deploy your application workloads in a separate, dedicated namespace instead of elastic-system or default. You will need to consider this when setting up your applications.

  3. Using kubectl logs, monitor the operator’s setup by watching the logs:

    kubectl -n elastic-system logs -f statefulset.apps/elastic-operator
    
  4. Use kubectl get pods to check the operator status, passing in the namespace using the -n flag:

    kubectl get -n elastic-system pods
    

    When the operator is ready to use, it will report as Running

    $ kubectl get -n elastic-system pods
    NAME                 READY   STATUS    RESTARTS   AGE
    elastic-operator-0   1/1     Running   0          1m