<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title><![CDATA[Omer Kushmaro - Elasticsearch Labs]]></title>
    <description><![CDATA[Articles and tutorials from the Search team at Elastic]]></description>
    <copyright><![CDATA[© 2026. Elasticsearch B.V. All Rights Reserved]]></copyright>
    <image>
      <title><![CDATA[Omer Kushmaro - Elasticsearch Labs]]></title>
      <url>https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt1121c0bf0e8a6e65/6a88da6340a1841030ef456f/search-labs-thumbnail.png</url>
      <link>https://www.elastic.co/cn/search-labs/author/omer-kushmaro</link>
    </image>
    <link>https://www.elastic.co/cn/search-labs/author/omer-kushmaro</link>
    <atom:link href="https://www.elastic.co/cn/search-labs/rss/author/omer-kushmaro.xml" rel="self" type="application/rss+xml"/>
    <language><![CDATA[cn]]></language>
    <lastBuildDate>Fri, 18 Sep 2026 19:46:02 GMT</lastBuildDate>
  <item>
    <title><![CDATA[Elastic Cloud on Kubernetes 简化：区域感知、重启和 mTLS]]></title>
    <description><![CDATA[ECK 3.4 将区域感知 HA 从 40 行 YAML 减少到一个字段，通过注释添加了声明式滚动重启，并自动连接 Kibana-Elasticsearch mTLS。]]></description>
    <content:encoded><![CDATA[<p>ECK 3.4 使 Kubernetes 上的 Elastic Stack 更易于操作。区域感知 HA、安全滚动重启和 Kibana↔Elasticsearch mTLS 在您的清单中都仅需一行配置即可实现。</p><p>如果您运行的是 <a href="https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s">Kubernetes 上的 Elastic Cloud</a> (ECK)，此版本旨在减少您日常工作中的摩擦。</p><h2>更易于操作，更易于理解</h2><p>ECK 3.4 版本的重点是减少在 Kubernetes 上运行 Elastic Stack 时需要考虑的问题。每个标题的更改都选取了一个多步骤任务，并将其转化为一个单一的陈述性答案：</p><ul><li><p><strong>简化的区域感知。</strong>现在，只需在 NodeSet 上填写一个字段，即可告知 ECK 集群应分布在多个可用区。操作员将代表您处理拓扑、调度和 Elasticsearch 端的感知配置。您的清单反映的是您的意图，而不是其连接方式。</p></li><li><p><strong>重启群集的方法与其他方法相同。</strong>触发滚动重启现在是 Elasticsearch 资源上的一个注释。它是声明式的，符合 GitOps，并且会留下审计跟踪。不要为了发布而对无关字段进行强制编辑。</p></li><li><p><strong>mTLS 由运营商自动配置。</strong>在 Kibana 和 Elasticsearch 手动连接互联 TLS 需要管理 CA、每个组件的客户端证书、挂载、轮换以及两端的配置。ECK 3.4 能够处理所有这些问题：在 Elasticsearch 上设置一个标记，将 Kibana 指向它，然后操作员就可以管理其余部分。</p></li></ul><p>这次发布旨在让 ECK 的日常操作变得枯燥乏味，但这是最好的那种枯燥乏味：需要记住的字段更少，保持同步的额外操作更少，清单也更易于理解。</p><h2>简化的区域感知</h2><p>通过在 NodeSet 上设置一个字段，即可实现 Elasticsearch 集群在多个可用区内的高可用性。ECK 3.4 可为您处理拓扑分布、Pod 调度和 Elasticsearch 端感知配置。</p><p><a href="https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s/advanced-elasticsearch-node-scheduling#k8s-availability-zone-awareness-example">在此之前</a>，您必须在四个不同的对象之间手动连接所有这些设置：Elasticsearch 资源上用于向下节点标签的注释、NodeSet 配置中的感知属性、Pod 模板中用于显示区域的 <code>fieldRef</code> 环境变量、匹配的 <code>topologySpreadConstraints</code> 块以及将集群固定到特定区域的 <code>nodeAffinity</code> 规则。大约 40 行 YAML，很容易配置错误。</p><p>在 ECK 3.4 中，同一个区域感知集群由四行组成：</p>apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: my-cluster
spec:
  version: 9.4.0
  nodeSets:
  - name: default
    count: 3
    zoneAwareness: {}<p>要固定到特定的区域集，请为其命名，ECK 会添加与其匹配的所需节点亲和规则：</p>spec:
  nodeSets:
  - name: hot
    count: 3
    zoneAwareness:
      zones: ["us-east-1a", "us-east-1b", "us-east-1c"]<p>如果您确实需要自定义 <code>maxSkew</code> 或 <code>whenUnsatisfiable</code>，在 <code>podTemplate</code> 中提供具有相同 <code>topologyKey</code> 的匹配拓扑扩展约束仍然是最佳选择。您的覆盖设置仍然有效。</p><p>升级注意事项：在现有 NodeSet 上启用 <code>zoneAwareness</code> 会更改 StatefulSet Pod 模板（新拓扑分布约束、<code>ZONE</code> 环境变量、节点亲和性、<code>node.attr.zone</code>），这会触发受影响 NodeSet 的一次性滚动重启。请做好相应的规划。</p><p>要了解有关简化区域管理的更多信息，您可以<a href="https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s/advanced-elasticsearch-node-scheduling">阅读 Elastic 文档上的此页面</a>。</p><h2>声明式滚动重启</h2><p>在 3.4 版本中，无需更改配置即可重启 Elasticsearch 集群已成为一项标准工作流。Elasticsearch 资源上的两个新注释完成了这项工作：</p><ul><li><p><code>eck.k8s.elastic.co/restart-trigger</code>：设置或更改此值（通常选择时间戳）以启动滚动重启。更改该值会触发稍后的另一次重启，而删除注释则不会。</p></li><li><p><code>eck.k8s.elastic.co/restart-allocation-delay</code>：可选的持续时间字符串（例如“20m”）作为重启期间的分配延迟传递给 Elasticsearch<a href="https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-shutdown-put-node"> 节点关闭 API</a>，以便在 Pod 回收期间暂缓重新平衡操作。</p></li></ul>apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: my-cluster
  annotations:
    eck.k8s.elastic.co/restart-trigger: "2026-04-30T10:00:00Z"
    eck.k8s.elastic.co/restart-allocation-delay: "20m"
spec:
  version: 9.4.0<p>在底层，ECK 将触发值传播到 Pod 注释，这会更改 StatefulSet 模板哈希值，并使每个 Pod 通过现有的滚动升级路径进行处理（节点关闭 API、谓词、逐个删除 Pod）。没有新的重启机制需要学习，滚动升级中已有的状态消息和可观测性也会沿用。</p><p>对于 GitOps 用户而言，这意味着 Flux/ArgoCD 管道只需修改一个注释即可请求重启：无需处理规格漂移，无需处理差异更新，也无需强制编辑无关字段。</p><h2>Kibana ↔ Elasticsearch 的托管 mTLS</h2><p>Kibana 与 Elasticsearch 之间的<a href="https://www.elastic.co/docs/deploy-manage/security/set-up-basic-security-plus-https">双向 TLS</a> 协调功能已随本次发布推出。Elasticsearch CRD 接受一个新的字段 <code>spec.http.tls.client.authentication: true</code>，该字段指示集群在其 HTTP 接口上要求客户端证书。ECK 负责其余工作：它会根据任何标记为 <code>eck.k8s.elastic.co/client-certificate: true</code> 的密钥构建信任包，将其挂载到 Elasticsearch Pod 中，设置 <code>xpack.security.http.ssl.client_authentication: required</code>，并签发操作员端客户端证书，以便在整个部署过程中能够持续与集群通信。</p><p>这使得为堆栈启用和配置 mTLS（在此次发布中仅限 Elasticsearch 和 Kibana）成为一项更简单的任务。</p><p>在 Elasticsearch 上启用 mTLS：</p>apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: secure-cluster
spec:
  version: 9.4.0
  http:
    tls:
      client:
        authentication: true # &lt;---- This is all you need
  nodeSets:
  - name: default
    count: 3<p>在客户端，Kibana 的关联控制器现在可以检测引用的 Elasticsearch 上的 <code>client-authentication-required</code> 注释，并自动为 Kibana 生成客户端证书，无需额外配置。如果您想使用自己的证书（如 cert-manager 或内部 PKI），请指向您已配置的密钥：</p>apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: kibana
spec:
  version: 9.4.0
  count: 1
  elasticsearchRef:
    name: secure-cluster
    clientCertificateSecretName: my-custom-client-cert<p>ECK 会轮换证书，将密钥挂载到 Kibana 容器中，并连接 <code>elasticsearch.ssl.certificate</code> 和 <code>elasticsearch.ssl.key</code>。mTLS 资源的清理工作将延迟到所有 Pod 都完成滚动更新后进行，因此在整个过渡期间都能保持连接性。</p><p>Kibana 是首个在 3.4 版本中获得这种优先级待遇的堆栈组件。对 APM 服务器、Beats、Fleet Server、Elastic Agent、Logstash、Maps 和 Enterprise Search 的支持将于近期推出。与此同时，一份<a href="https://github.com/elastic/cloud-on-k8s/pull/9124">新的教程</a>详细介绍了如何使用 cert-manager 为这些组件手动配置 mTLS。</p><h2>其他显著改进</h2><p>此版本还包含其他值得关注的改进。以下是一份包含其相关拉取请求的列表。</p><ul><li><p><strong>在已启用 FIPS 的操作员（单独镜像）中支持原生 Go FIPS 140-3。</strong>FIPS 风格的 ECK 镜像（<code>docker.elastic.co/eck/eck-operator-fips:3.4.0</code>，以及 UBI 变体 <code>eck-operator-ubi-fips:3.4.0</code>）现已支持原生 Go FIPS 140-3，固定在经过认证的 <code>GOFIPS140=v1.0.0</code> 模块上，并在运行时强制执行。标准 <code>eck-operator</code> 图像保持不变。对于 Elasticsearch 9.4.0 或更高版本，操作员在设置 <code>xpack.security.fips_mode.enabled: true</code> 时还会自动生成并挂载符合 FIPS 的密钥存储密码 (<a href="https://github.com/elastic/cloud-on-k8s/pull/9263">#9263</a>，<a href="https://github.com/elastic/cloud-on-k8s/pull/9287">#9287</a>）。</p></li><li><p><strong>值得特别指出的可靠性修复：</strong></p><ul><li><p>现在可检测到证书链中的过期 CA，并触发重新签发 (<a href="https://github.com/elastic/cloud-on-k8s/pull/9197">#9197</a>）。</p></li><li><p>远程 CA 密钥生成失败不会导致阻塞 (<a href="https://github.com/elastic/cloud-on-k8s/pull/9271">#9271</a>)。</p></li><li><p>在软多租户配置中，NetworkPolicy 命名空间选择器标签是固定的 <a href="https://github.com/elastic/cloud-on-k8s/pull/9153">(#9153</a>)。</p></li><li><p>如果已经存在同名卷，则 Elasticsearch 控制器会跳过其默认 PVC (<a href="https://github.com/elastic/cloud-on-k8s/pull/9199">#9199</a>)。</p></li><li><p>DaemonSet 调节器处理过期缓存的方式与部署调节器相同 (<a href="https://github.com/elastic/cloud-on-k8s/pull/9256">#9256</a>)。</p></li></ul></li></ul><h2>开始使用</h2><p>如果您已在运行 ECK，请使用 Helm 升级至 3.4.0：</p>helm upgrade elastic-operator elastic/eck-operator -n elastic-system<p>或直接应用最新的操作员清单：</p>kubectl apply -f https://download.elastic.co/downloads/eck/3.4.0/crds.yaml
kubectl apply -f https://download.elastic.co/downloads/eck/3.4.0/operator.yaml<p>如果您是 ECK 的新手，请从<a href="https://www.elastic.co/docs/deploy-manage/deploy/cloud-on-k8s#eck-quickstart">快速入门指南</a>开始，几分钟内即可在 Kubernetes 上运行 Elasticsearch 集群。</p><p>有关更改的完整列表，请参阅 <a href="https://github.com/elastic/cloud-on-k8s/releases/tag/v3.4.0">GitHub 上的 ECK 3.4.0 发行说明</a>。</p><p>要立即开始使用 Elastic Cloud，请登录到 <a href="https://cloud.elastic.co/">Elastic Cloud 控制台</a>或注册<a href="https://cloud.elastic.co/registration">免费试用</a>。</p><h2>常见问题</h2><p><strong>如何在 ECK 中使 Elasticsearch 集群具备区域感知能力，而无需编写拓扑分布约束？</strong></p><p>在 Elasticsearch 资源上设置 <code>spec.nodeSets[].zoneAwareness: {}</code>。ECK 会导出拓扑结构，附加 <code>node.attr.zone</code>，设置 <code>maxSkew=1</code> 拓扑分布约束，并为您注入向下标签。如果要绑定到一组特定的可用区，请提供 <code>zones: [...]</code>。在现有 NodeSet 上启用此功能会导致一次性滚动重启。</p><p><strong>我能否在不编辑规范的情况下触发 Kubernetes 上 Elasticsearch 集群的滚动重启？</strong></p><p>是的。ECK 3.4 在 Elasticsearch 资源上引入了两个注释：<code>eck.k8s.elastic.co/restart-trigger</code>（设置或更改值，例如时间戳，以启动滚动重启）和 <code>eck.k8s.elastic.co/restart-allocation-delay</code>（传递给 Elasticsearch 节点关闭 API 的可选持续时间字符串）。删除触发器注释不会启动新的重启。</p><p><strong>如何在 Kubernetes 上启用 Kibana 和 Elasticsearch 之间的双向 TLS？</strong></p><p>使用 ECK 3.4，在 Elasticsearch CRD 上设置 <code>spec.http.tls.client.authentication: true</code>，并通过 <code>elasticsearchRef</code> 从 Kibana 引用它。ECK 会自动为 Kibana 生成客户端证书，从任何标记为 <code>eck.k8s.elastic.co/client-certificate: true</code> 的密钥构建信任包，并为您配置 <code>xpack.security.http.ssl.client_authentication: required</code>。适用于 Kibana ↔ Elasticsearch 的 mTLS 在 3.4 版本中是技术预览。</p><p><strong>ECK 3.4 的 mTLS 支持是否涵盖 Beats 和 Fleet 等所有堆栈组件？</strong></p><p>还没有。Kibana 是首个在 3.4 版本中获得优先 mTLS 支持的堆栈组件——操作员会自动生成客户端证书。对 APM 服务器、Beats、Fleet Server、Elastic Agent、Logstash、Maps 和 Enterprise Search 的支持将在下一个版本中提供。一份新的教程详细介绍了如何为目前使用 cert-manager 的组件手动配置 mTLS。</p><p><strong>ECK 支持 FIPS 140-3 吗？</strong></p><p>是的，在单独的操作员图像中。ECK 3.4 发布了支持 Go FIPS 140-3 原生版本的 FIPS 风格的版本（<code>docker.elastic.co/eck/eck-operator-fips:3.4.0</code>，外加 UBI 变体）。标准 <code>eck-operator</code> 图像保持不变。对于 Elasticsearch 9.4.0 或更高版本，当设置 <code>xpack.security.fips_mode.enabled: true</code> 时，ECK 还会自动生成并挂载符合 FIPS 标准的密钥库密码。</p>]]></content:encoded>
    <link>https://www.elastic.co/search-labs/blog/elasticsearch-kubernetes-zone-awareness-restarts-mtls</link>
    <guid isPermaLink="true">https://www.elastic.co/search-labs/blog/elasticsearch-kubernetes-zone-awareness-restarts-mtls</guid>
    <category><![CDATA[Kubernetes]]></category>
    <dc:creator><![CDATA[Omer Kushmaro]]></dc:creator>
    <enclosure url="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/bltef5f197adb2b717e/6a17e85b4b055d1a85432209/d8a9512a3839164368d348637803c0d486cb1cb2-720x420.jpg" length="0" type="image/jpeg"/>
    <pubDate>Fri, 15 May 2026 00:00:00 GMT</pubDate>
  </item>
  </channel>
</rss>