首页 > 其他分享 >Elasticsearch专题精讲——Installing Elasticsearch ——Install ECK using the Helm chart

Elasticsearch专题精讲——Installing Elasticsearch ——Install ECK using the Helm chart

时间:2023-05-01 20:33:47浏览次数:43  
标签:elastic namespace 精讲 helm ECK Helm Elasticsearch operator

Install ECK using the Helm chart

Starting from ECK 1.3.0, a Helm chart is available to install ECK. It is available from the Elastic Helm repository and can be added to your Helm repository list by running the following command:

从 ECK 1.3.0 开始,可以使用 Helm 来安装 ECK。它可以从 Elastic Helm 仓库获得,并且可以通过运行以下命令添加到 Helm 仓库列表中:

helm repo add elastic https://helm.elastic.co
helm repo update
  

The minimum supported version of Helm is 3.2.0.

Helm 的最小支持版本是3.2.0。

一、Cluster-wide(global)installation

This is the default mode of installation and is equivalent to installing ECK using the stand-alone YAML manifests(https://www.cnblogs.com/zuoyang/p/17366871.html).

这是默认的安装模式,相当于使用独立的 YAML 清单安装 ECK。

 
helm install elastic-operator elastic/eck-operator -n elastic-system --create-namespace

  

二、Restricted installation

This mode avoids installing any cluster-scoped resources and restricts the operator to manage only a set of pre-defined namespaces.

此模式避免安装任何集群范围的资源,并限制操作员只能管理一组预定义的命名空间。

Since CRDs are global resources, they still need to be installed by an administrator. This can be achieved by:

由于 CRD 是全球资源,因此仍需由管理员安装:

helm install elastic-operator-crds elastic/eck-operator-crds

The operator can be installed by any user who has full access to the set of namespaces they wish to manage. The following example installs the operator to elastic-system namespace and configures it to manage only namespace-a and namespace-b:

任何用户只要能够完全访问他们希望管理的命名空间集,就可以安装该运算符。下面的示例将运算符安装到弹性系统命名空间,并将其配置为仅管理命名空间 -a 和命名空间 -b:

helm install elastic-operator elastic/eck-operator -n elastic-system --create-namespace \
  --set=installCRDs=false \
  --set=managedNamespaces='{namespace-a, namespace-b}' \
  --set=createClusterScopedResources=false \
  --set=webhook.enabled=false \
  --set=config.validateStorageClass=false

  

 

The eck-operator chart contains several pre-defined profiles to help you install the operator in different configurations. These profiles can be found in the root of the chart directory, prefixed with profile-. For example, the restricted configuration illustrated in the previous code extract is defined in the profile-restricted.yaml file, and can be used as follows:

Eck 操作符图表包含几个预定义的配置文件,以帮助您以不同的配置安装操作符。这些配置文件可以在图表目录的根目录中找到,前缀为 profile-。例如,在前面的代码提取中说明的受限制配置在概要文件限制中定义。Yaml 文件,可用于以下方面:

helm install elastic-operator elastic/eck-operator -n elastic-system --create-namespace \
  --values="${CHART_DIR}/profile-restricted.yaml" \
  --set=managedNamespaces='{namespace-a, namespace-b}'

  

You can find the profile files in the Helm cache directory or from the ECK source repository.

您可以在 Helm 缓存目录或 ECK 源存储库中找到配置文件。

三、View available configuration options 

You can view all configurable values by running the following:

helm show values elastic/eck-operator

  

You can migrate an existing operator installation to Helm by adding the meta.helm.sh/release-namemeta.helm.sh/release-namespace annotations and the app.kubernetes.io/managed-by label to all the resources you want to be adopted by Helm. You must do this for the Elastic Custom Resource Definitions (CRD) because deleting them would trigger the deletion of all deployed Elastic applications as well. All other resources are optional and can be deleted.

你可以通过添加 meta.Helm.sh/release-name、 meta.Helm.sh/release-namespace 注释和 app.kubernetes.io/managed-by 标签将现有的操作员安装迁移到 Helm。您必须为弹性自定义资源定义(CRD)这样做,因为删除它们也会触发所有已部署的弹性应用程序的删除。所有其他资源都是可选的,可以删除。

 

A shell script is available in the ECK source repository to demonstrate how to migrate from version 1.7.1 to Helm. You can modify it to suit your own environment.

ECK 源代码库中提供了一个 shell 脚本来演示如何从版本1.7.1迁移到 Helm。您可以修改它以适应您自己的环境。

For example, an ECK 1.2.1 installation deployed using the quickstart guide can be migrated to Helm as follows:

例如,使用 Quick start 指南部署的 ECK 1.2.1安装可以迁移到 Helm,如下所示:

  1. Annotate and label all the ECK CRDs with the appropriate Helm annotations and labels. CRDs need to be preserved to retain any existing Elastic applications deployed using the operator.

    使用适当的 Helm 注释和标签对所有 ECK CRD 进行注释和标签。需要保留 CRD,以保留使用操作符部署的任何现有 Elastic 应用程序。

    for CRD in $(kubectl get crds --no-headers -o custom-columns=NAME:.metadata.name | grep k8s.elastic.co); do
        kubectl annotate crd "$CRD" meta.helm.sh/release-name="$RELEASE_NAME"
        kubectl annotate crd "$CRD" meta.helm.sh/release-namespace="$RELEASE_NAMESPACE"
        kubectl label crd "$CRD" app.kubernetes.io/managed-by=Helm
    done
    

     

  2. Uninstall the current ECK operator. You can do this by taking the operator.yaml file you used to install the operator and running kubectl delete -f operator.yaml. Alternatively, you could delete each resource individually.

    卸载当前 ECK 操作员。为此,可以使用用于安装操作符的 operator.yaml 文件并运行 kubectl delete-f operator.yaml。或者,您可以单独删除每个资源。

    kubectl delete -n elastic-system \
        serviceaccount/elastic-operator \
        secret/elastic-webhook-server-cert \
        clusterrole.rbac.authorization.k8s.io/elastic-operator \
        clusterrole.rbac.authorization.k8s.io/elastic-operator-view \
        clusterrole.rbac.authorization.k8s.io/elastic-operator-edit \
        clusterrolebinding.rbac.authorization.k8s.io/elastic-operator \
        service/elastic-webhook-server \
        configmap/elastic-operator \ 
        statefulset.apps/elastic-operator \
        validatingwebhookconfiguration.admissionregistration.k8s.io/elastic-webhook.k8s.elastic.co
    

      

    If you have previously customized the operator configuration in this ConfigMap, you will have to repeat the configuration once the operator has been reinstalled in the next step.

    如果您以前已经在这个 ConfigMap 中定制了操作符配置,那么在下一步中重新安装操作符之后,您必须重复这个配置。

  3. Install the ECK operator using the Helm chart as described in Install ECK using the Helm chart.
    1. 使用 Helm 图表安装 ECK 操作员,如使用 Helm 图表安装 ECK 中所述。
     

 

标签:elastic,namespace,精讲,helm,ECK,Helm,Elasticsearch,operator
From: https://www.cnblogs.com/zuoyang/p/17366962.html

相关文章

  • Elasticsearch专题精讲——Installing Elasticsearch——Elastic Cloud on Kubernetes
    InstallingElasticsearch——ElasticCloudonKubernetes(ECK)https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s_supported_versions.html一、SupportedVersions:Kubernetes1.22-1.26OpenShift4.8-4.12GoogleKubernetesEngine(GKE),AzureKubernetes......
  • Elasticsearch专题精讲——What's new in 8.7?
    What'snewin8.7?https://www.elastic.co/guide/en/elasticsearch/reference/8.7/release-highlights.html,ortherversions:8.6 | 8.5 | 8.4 | 8.3 | 8.2 | 8.1 | 8.0Timeseries(TSDS)GA(时间序列)TimeSeriesDataStream(TSDS)isafeatureforoptimi......
  • Elasticsearch专题精讲——What is Elasticsearch?
    WhatisElasticsearch?https://www.elastic.co/guide/en/elasticsearch/reference/8.7/elasticsearch-intro.html ElasticsearchisthedistributedsearchandanalyticsengineattheheartoftheElasticStack.LogstashandBeatsfacilitatecollecting,aggrega......
  • GridView中CheckBox的数据绑定显示选中和未选中问题
    https://www.cnblogs.com/zxd543/p/3121169.html效果如下(以会员价为例)会员价(MemberPrice)字段的数据库类型为int(1表示true,0表示false)页面绑定如下:<asp:TemplateFieldHeaderText="会员价"><ItemStyleHorizontalAlign="Center"Width="60px"/>......
  • ElasticSearch是什么
    一、ElasticSearch简介ElasticsearchElasticsearch是一个基于ApacheLucene(TM)的开源搜索引擎。无论在开源还是专有领域,Lucene可以被认为是迄今为止最先进、性能最好的、功能最全的搜索引擎库。特点:分布式的实时文件存储,每个字段都被索引并可被搜索分布式的实时分析搜索引......
  • 老杜2023最新Vue实战精讲(五)Vuex
    动力节点老杜全新版Vue教程笔记分享给大家学习の地止:https://www.bilibili.com/video/BV17h41137i4视频教程从Vue2开始讲解,一步一个案例,知识点由浅入深,然后很自然的过度到Vue3版本。Vue3是目前企业中使用最多的一个版本。视频中会把每一个Vue的知识点讲解的非常通透,不但举例......
  • Vulkan Support Check and Dynamic Loader C++ code sample
    很多时候不想静态依赖VulkanSDK所提供的静态库,因为会遇到一些过早的电脑不支持vulkan,那么就需要使用动态加载vulkan-1.dll(forWindows)或libMoltenVK.dylib(forMacOS)的方式进行判断了。VulkanSDK提供了相关头文件实现可以做到相关功能,仅需要include一下头文件`vulkan/vulkan.hpp......
  • 搭建ElasticSearch7.4.2集群
    推荐阅读Helm3(K8S资源对象管理工具)视频教程:https://edu.csdn.net/course/detail/32506Helm3(K8S资源对象管理工具)博客专栏:https://blog.csdn.net/xzk9381/category_10895812.html本文原文链接:https://blog.csdn.net/xzk9381/article/details/117465038,转载请注明出处。如有发现文......
  • elasticsearch 7.4.2设置安全认证
    1、修改elasticsearch.yml文件,重启ES#允许head插件等访问的相关设置http.cors.enabled:truehttp.cors.allow-origin:"*"http.cors.allow-headers:Authorization,X-Requested-With,Content-Length,Content-Typehttp.cors.allow-credentials:true#是否启用es的安全设置,启......
  • 关于el-checkbox-group 报错 length 未定义
     问题原因:页面在初始化的时候el-checkbox-group的v-model要绑定一个数组,但是我的在生命周期的created中才为其绑定数据,造成再渲染dom时绑定数据类型不对而报错解决办法:1.在视图渲染之前给该值赋值为空数组 解决办法:2在data中定义的数据初始化一个数组推荐使用方法2,方法1......