Elasticsearch专题精讲——Installing Elasticsearch —— Elastic Cloud on Kubernetes(ECK) (Quickstart)

Installing Elasticsearch —— Elastic Cloud on Kubernetes(ECK) (Quickstart)

https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s_supported_versions.html

一、Supported Versions:

    • Kubernetes 1.22-1.26
    • OpenShift 4.8-4.12
    • Google Kubernetes Engine (GKE), Azure Kubernetes Service (AKS), and Amazon Elastic Kubernetes Service (EKS)
    • Helm: 3.2.0+
    • Elasticsearch, Kibana, APM Server: 6.8+, 7.1+, 8+
    • Enterprise Search: 7.7+, 8+
    • Beats: 7.0+, 8+
    • Elastic Agent: 7.10+ (standalone), 7.14+ (Fleet), 8+
    • Elastic Maps Server: 7.11+, 8+

ECK should work with all conformant installers as listed in these FAQs. Distributions include source patches and so may not work as-is with ECK.

ECK 应该与这些常见问题中列出的所有符合要求的安装程序一起工作。发行版包括源代码补丁,因此可能无法按原样使用 ECK。

Elastic Stack application images for the OpenShift-certified Elasticsearch (ECK) Operator are only available from version 7.10 and later.

OpenShift 认证的 Elasticsearch (ECK)操作符的 Elastic Stack 应用程序映像只能在7.10及更高版本中获得。

Alpha, beta, and stable API versions follow the same conventions used by Kubernetes.

Alpha、 beta 和 stable API 版本遵循 Kubernetes 使用的相同约定。

二、Deploy ECK in your Kubernetes cluster

https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-eck.html

2.1、Install custom resource definitions:

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

The following Elastic resources have been 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  

2.2、Install the operator with its RBAC rules:

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

2.3、Monitor the operator logs:

kubectl -n elastic-system logs -f statefulset.apps/elastic-operator

 三、Deploy an Elasticsearch cluster

https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html#k8s-deploy-elasticsearch

Apply a simple Elasticsearch cluster specification, with one Elasticsearch node,官方的例子,只有一个 Elasticsearch 节点:

cat <<EOF | kubectl apply -f -
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 8.7.0
  nodeSets:
  - name: default
    count: 1
    config:
      node.store.allow_mmap: false
EOF

四、Use persistent storage

https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-persistent-storage.html

The cluster that you deployed in this quickstart guide only allocates a persistent volume of 1GiB for storage using the default storage class defined for the Kubernetes cluster. You will most likely want to have more control over this for production workloads. Refer to Volume claim templates for more information.

您在快速启动指南中部署的集群只使用为 Kubernetes 集群定义的默认存储类为存储分配1GiB 的持久卷。您很可能希望对生产工作负载有更多的控制。有关更多信息,请参见卷索赔模板。

五、Check out the samples

https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-check-samples.html

You can find a set of sample resources in the project repository(https://github.com/elastic/cloud-on-k8s/tree/2.7/config/samples).

您可以在项目存储库中找到一组示例资源( https://github.com/elastic/cloud-on-k8s/tree/2.7/config/samples )。

For a full description of each (CRD), refer to the API Reference or view the CRD files in the project repository. You can also retrieve information about a CRD from the cluster. For example, describe the Elasticsearch CRD specification with:

有关每个 CRD 的完整描述,请参考 API 参考或查看项目存储库中的 CRD 文件。您还可以从集群中检索有关 CRD 的信息。例如,用以下方法描述 Elasticsearch CRD 规范:

kubectl describe crd elasticsearch
posted @ 2023-05-01 19:30  左扬  阅读(154)  评论(0编辑  收藏  举报
levels of contents