Skip to content

Commit 33ae96a

Browse files
authored
Merge branch 'main' into dm-security
2 parents 7042967 + 5419e3e commit 33ae96a

21 files changed

+323
-28
lines changed

deploy-manage/deploy/cloud-on-k8s.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ Alpha, beta, and stable API versions follow the same [conventions used by Kubern
8080

8181
ECK is compatible with the following Elastic Stack applications:
8282

83-
* Elasticsearch, Kibana, APM Server: 6.8+, 7.1+, 8+
84-
* Enterprise Search: 7.7+, 8+
85-
* Beats: 7.0+, 8+
86-
* Elastic Agent: 7.10+ (standalone), 7.14+ (Fleet), 8+
87-
* Elastic Maps Server: 7.11+, 8+
83+
* Elasticsearch, Kibana, APM Server: 7.17+, 8+
84+
* Enterprise Search: 7.17+, 8+
85+
* Beats: 7.17+, 8+
86+
* Elastic Agent: 7.10+ (standalone), 7.17+ (Fleet), 8+
87+
* Elastic Maps Server: 7.17+, 8+
8888
* Logstash: 8.7+
8989

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

deploy-manage/deploy/cloud-on-k8s/configure-eck.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mapped_pages:
1212
This page explains the various methods for configuring and applying ECK settings.
1313

1414
::::{tip}
15-
For a detailed list and description of all available settings in ECK, refer to [ECK configuration flags](asciidocalypse://docs/cloud-on-k8s/docs/reference/eck-configuration-flags.md).
15+
For a detailed list and description of all available settings in ECK, refer to [ECK configuration flags](cloud-on-k8s://reference/eck-configuration-flags.md).
1616
::::
1717

1818
By default, the ECK installation includes a [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/) with an `eck.yaml` key where you can add, remove, or update configuration settings. This ConfigMap is mounted into the operator’s container as a file, and provided to the application through the `--config` flag.
@@ -56,7 +56,7 @@ If you installed ECK using the manifests and the commands listed in [Deploy ECK]
5656

5757
You can update the ConfigMap directly using the command `kubectl edit configmap elastic-operator -n elastic-operator` or modify the installation manifests and reapply them with `kubectl apply -f <your-manifest-file.yaml>`.
5858

59-
The following shows the default `elastic-operator` ConfigMap, for reference purposes. Refer to [ECK configuration flags](asciidocalypse://docs/cloud-on-k8s/docs/reference/eck-configuration-flags.md) for a complete list of available settings.
59+
The following shows the default `elastic-operator` ConfigMap, for reference purposes. Refer to [ECK configuration flags](cloud-on-k8s://reference/eck-configuration-flags.md) for a complete list of available settings.
6060

6161
```yaml
6262
apiVersion: v1

deploy-manage/deploy/cloud-on-k8s/elasticsearch-deployment-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The cluster that you deployed in this quickstart guide only allocates a persiste
4444
::::
4545

4646

47-
For a full description of each `CustomResourceDefinition` (CRD), refer to the [*API Reference*](asciidocalypse://docs/cloud-on-k8s/docs/reference/k8s-api-reference.md) or view the CRD files in the [project repository](https://github.com/elastic/cloud-on-k8s/tree/2.16/config/crds). You can also retrieve information about a CRD from the cluster. For example, describe the {{es}} CRD specification with [`describe`](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_describe/):
47+
For a full description of each `CustomResourceDefinition` (CRD), refer to the [*API Reference*](cloud-on-k8s://reference/api-docs.md) or view the CRD files in the [project repository](https://github.com/elastic/cloud-on-k8s/tree/2.16/config/crds). You can also retrieve information about a CRD from the cluster. For example, describe the {{es}} CRD specification with [`describe`](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_describe/):
4848

4949
```sh
5050
kubectl describe crd elasticsearch

deploy-manage/deploy/cloud-on-k8s/k8s-service-mesh-linkerd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ kubectl annotate namespace elastic-stack linkerd.io/inject=enabled
4343

4444
Any Elasticsearch, Kibana, or APM Server resources deployed to a namespace with the above annotation will automatically join the mesh.
4545

46-
Alternatively, if you only want specific resources to join the mesh, add the `linkerd.io/inject: enabled` annotation to the `podTemplate` (check [API documentation](asciidocalypse://docs/cloud-on-k8s/docs/reference/k8s-api-reference.md)) of the resource as follows:
46+
Alternatively, if you only want specific resources to join the mesh, add the `linkerd.io/inject: enabled` annotation to the `podTemplate` (check [API documentation](cloud-on-k8s://reference/api-docs.md)) of the resource as follows:
4747

4848
```yaml
4949
podTemplate:

deploy-manage/deploy/cloud-on-k8s/kibana-instance-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ To deploy a simple [{{kib}}](/get-started/the-stack.md#stack-components-kibana)
6666
```
6767

6868

69-
For a full description of each `CustomResourceDefinition` (CRD), refer to the [*API Reference*](asciidocalypse://docs/cloud-on-k8s/docs/reference/k8s-api-reference.md) or view the CRD files in the [project repository](https://github.com/elastic/cloud-on-k8s/tree/2.16/config/crds). You can also retrieve information about a CRD from the instance. For example, describe the {{kib}} CRD specification with [`describe`](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_describe/):
69+
For a full description of each `CustomResourceDefinition` (CRD), refer to the [*API Reference*](cloud-on-k8s://reference/api-docs.md) or view the CRD files in the [project repository](https://github.com/elastic/cloud-on-k8s/tree/2.16/config/crds). You can also retrieve information about a CRD from the instance. For example, describe the {{kib}} CRD specification with [`describe`](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_describe/):
7070

7171
```sh
7272
kubectl describe crd kibana
Lines changed: 202 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,202 @@
1-
# Upgrade {{es}}
1+
---
2+
applies_to:
3+
deployment:
4+
self: all
5+
---
6+
7+
# Upgrade {{es}} [upgrading-elasticsearch]
8+
9+
An {{es}} cluster can be upgraded one node at a time so upgrading does not interrupt service. Running multiple versions of {{es}} in the same cluster beyond the duration of an upgrade is not supported, as shards cannot be replicated from upgraded nodes to nodes running the older version.
10+
11+
Before you start, [take the upgrade preparation steps](../../../deploy-manage/upgrade/prepare-to-upgrade.md). When performing a [rolling upgrade](../../../deploy-manage/upgrade/deployment-or-cluster.md#rolling-upgrades):
12+
13+
1. Upgrade the data nodes first, tier-by-tier, starting with the frozen tier, then the cold tier, then the warm tier, then the hot tier, and finally any other data nodes which are not in a tier. Complete the upgrade for all nodes in each data tier before moving to the next. This ensures {{ilm-init}} can continue to move data through the tiers during the upgrade. You can get the list of nodes in a specific tier with a `GET /_nodes` request, for example: `GET /_nodes/data_frozen:true/_none`.
14+
2. Upgrade all remaining nodes that are neither master-eligible nor data nodes. This includes dedicated ML nodes, dedicated ingest nodes, and dedicated coordinating nodes.
15+
3. Upgrade the master-eligible nodes last. You can retrieve a list of these nodes with `GET /_nodes/master:true/_none`.
16+
17+
This order ensures that all nodes can join the cluster during the upgrade. Upgraded nodes can join a cluster with an older master, but older nodes cannot always join a cluster with a upgraded master.
18+
19+
To upgrade a cluster:
20+
21+
1. **Disable shard allocation**.
22+
23+
When you shut down a data node, the allocation process waits for `index.unassigned.node_left.delayed_timeout` (by default, one minute) before starting to replicate the shards on that node to other nodes in the cluster, which can involve a lot of I/O. Since the node is shortly going to be restarted, this I/O is unnecessary. You can avoid racing the clock by [disabling allocation](elasticsearch://reference/elasticsearch/configuration-reference/cluster-level-shard-allocation-routing-settings.md#cluster-routing-allocation-enable) of replicas before shutting down [data nodes](elasticsearch://reference/elasticsearch/configuration-reference/node-settings.md#data-node):
24+
25+
```console
26+
PUT _cluster/settings
27+
{
28+
"persistent": {
29+
"cluster.routing.allocation.enable": "primaries"
30+
}
31+
}
32+
```
33+
34+
2. **Stop non-essential indexing and perform a flush.** (Optional)
35+
36+
While you can continue indexing during the upgrade, shard recovery is much faster if you temporarily stop non-essential indexing and perform a [flush](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush).
37+
38+
```console
39+
POST /_flush
40+
```
41+
42+
3. **Temporarily stop the tasks associated with active {{ml}} jobs and {{dfeeds}}.** (Optional)
43+
44+
It is possible to leave your {{ml}} jobs running during the upgrade, but it puts increased load on the cluster. When you shut down a {{ml}} node, its jobs automatically move to another node and restore the model states.
45+
46+
::::{note}
47+
Any {{ml}} indices created before 8.x must be reindexed before upgrading, which you can initiate from the **Upgrade Assistant** in 8.18. For more information, refer to [Anomaly detection results migration]
48+
::::
49+
50+
51+
* Temporarily halt the tasks associated with your {{ml}} jobs and {{dfeeds}} and prevent new jobs from opening by using the [set upgrade mode API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-set-upgrade-mode):
52+
53+
```console
54+
POST _ml/set_upgrade_mode?enabled=true
55+
```
56+
57+
When you disable upgrade mode, the jobs resume using the last model state that was automatically saved. This option avoids the overhead of managing active jobs during the upgrade and is faster than explicitly stopping {{dfeeds}} and closing jobs.
58+
59+
* [Stop all {{dfeeds}} and close all jobs](../../../explore-analyze/machine-learning/anomaly-detection/ml-ad-run-jobs.md#ml-ad-close-job). This option saves the model state at the time of closure. When you reopen the jobs after the upgrade, they use the exact same model. However, saving the latest model state takes longer than using upgrade mode, especially if you have a lot of jobs or jobs with large model states.
60+
61+
4. $$$upgrade-node$$$ **Shut down a single node**.
62+
63+
To shut down a single node depends on what is currently used to run {{es}}. For example, if using `systemd` or SysV `init` run the commands below.
64+
65+
* If you are running {{es}} with `systemd`:
66+
67+
```sh
68+
sudo systemctl stop elasticsearch.service
69+
```
70+
71+
* If you are running {{es}} with SysV `init`:
72+
73+
```sh
74+
sudo -i service elasticsearch stop
75+
```
76+
77+
5. **Upgrade the node you shut down.**
78+
79+
To upgrade using a [Debian](../../../deploy-manage/deploy/self-managed/install-elasticsearch-with-debian-package.md) or [RPM](../../../deploy-manage/deploy/self-managed/install-elasticsearch-with-rpm.md) package:
80+
81+
* Use `rpm` or `dpkg` to install the new package. All files are installed in the appropriate location for the operating system and {{es}} config files are not overwritten.
82+
83+
To upgrade using a zip or compressed tarball:
84+
85+
1. Extract the zip or tarball to a **new** directory. This is critical if you are not using external `config` and `data` directories.
86+
2. Set the `ES_PATH_CONF` environment variable to specify the location of your external `config` directory and `jvm.options` file. If you are not using an external `config` directory, copy your old configuration over to the new installation.
87+
3. Set `path.data` in `config/elasticsearch.yml` to point to your external data directory. If you are not using an external `data` directory, copy your old data directory over to the new installation.<br>
88+
89+
::::{important}
90+
If you use {{monitor-features}}, re-use the data directory when you upgrade {{es}}. Monitoring identifies unique {{es}} nodes by using the persistent UUID, which is stored in the data directory.
91+
::::
92+
93+
4. Set `path.logs` in `config/elasticsearch.yml` to point to the location where you want to store your logs. If you do not specify this setting, logs are stored in the directory you extracted the archive to.
94+
95+
::::{tip}
96+
When you extract the zip or tarball packages, the `elasticsearch-{{bare_version}}` directory contains the {{es}} `config`, `data`, and `logs` directories.
97+
98+
We recommend moving these directories out of the {{es}} directory so that there is no chance of deleting them when you upgrade {{es}}. To specify the new locations, use the `ES_PATH_CONF` environment variable and the `path.data` and `path.logs` settings. For more information, see [Important {{es}} configuration](../../../deploy-manage/deploy/self-managed/important-settings-configuration.md).
99+
100+
The Debian and RPM packages place these directories in the appropriate place for each operating system. In production, we recommend using the deb or rpm package.
101+
102+
::::
103+
104+
105+
$$$rolling-upgrades-bootstrapping$$$
106+
Leave `cluster.initial_master_nodes` unset when performing a rolling upgrade. Each upgraded node is joining an existing cluster so there is no need for [cluster bootstrapping](../../../deploy-manage/distributed-architecture/discovery-cluster-formation/modules-discovery-bootstrap-cluster.md). You must configure [either `discovery.seed_hosts` or `discovery.seed_providers`](../../../deploy-manage/deploy/self-managed/important-settings-configuration.md#discovery-settings) on every node.
107+
108+
6. **Upgrade any plugins.**
109+
110+
Use the `elasticsearch-plugin` script to install the upgraded version of each installed {{es}} plugin. All plugins must be upgraded when you upgrade a node.
111+
112+
7. **Start the upgraded node.**
113+
114+
Start the newly-upgraded node and confirm that it joins the cluster by checking the log file or by submitting a `_cat/nodes` request:
115+
116+
```console
117+
GET _cat/nodes
118+
```
119+
120+
8. **Reenable shard allocation.**
121+
122+
For data nodes, once the node has joined the cluster, remove the `cluster.routing.allocation.enable` setting to enable shard allocation and start using the node:
123+
124+
```console
125+
PUT _cluster/settings
126+
{
127+
"persistent": {
128+
"cluster.routing.allocation.enable": null
129+
}
130+
}
131+
```
132+
133+
9. **Wait for the node to recover.**
134+
135+
Before upgrading the next node, wait for the cluster to finish shard allocation. You can check progress by submitting a `_cat/health` request:
136+
137+
```console
138+
GET _cat/health?v=true
139+
```
140+
141+
Wait for the `status` column to switch to `green`. Once the node is `green`, all primary and replica shards have been allocated.
142+
143+
::::{important}
144+
During a rolling upgrade, primary shards assigned to a node running the new version cannot have their replicas assigned to a node with the old version. The new version might have a different data format that is not understood by the old version.
145+
146+
If it is not possible to assign the replica shards to another node (there is only one upgraded node in the cluster), the replica shards remain unassigned and status stays `yellow`.
147+
148+
In this case, you can proceed once there are no initializing or relocating shards (check the `init` and `relo` columns).
149+
150+
As soon as another node is upgraded, the replicas can be assigned and the status will change to `green`.
151+
152+
::::
153+
154+
155+
Shards that were not flushed might take longer to recover. You can monitor the recovery status of individual shards by submitting a `_cat/recovery` request:
156+
157+
```console
158+
GET _cat/recovery
159+
```
160+
161+
If you stopped indexing, it is safe to resume indexing as soon as recovery completes.
162+
163+
10. **Repeat**.
164+
165+
When the node has recovered and the cluster is stable, repeat these steps for each node that needs to be updated. You can monitor the health of the cluster with a `_cat/health` request:
166+
167+
```console
168+
GET /_cat/health?v=true
169+
```
170+
171+
And check which nodes have been upgraded with a `_cat/nodes` request:
172+
173+
```console
174+
GET /_cat/nodes?h=ip,name,version&v=true
175+
```
176+
177+
11. **Restart machine learning jobs.**
178+
179+
If you temporarily halted the tasks associated with your {{ml}} jobs, use the set upgrade mode API to return them to active states:
180+
181+
```console
182+
POST _ml/set_upgrade_mode?enabled=false
183+
```
184+
185+
If you closed all {{ml}} jobs before the upgrade, open the jobs and start the datafeeds from {{kib}} or with the [open jobs](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-open-job) and [start datafeed](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-datafeed) APIs.
186+
187+
188+
189+
## Rolling upgrades [rolling-upgrades]
190+
191+
During a rolling upgrade, the cluster continues to operate normally. However, any new functionality is disabled or operates in a backward compatible mode until all nodes in the cluster are upgraded. New functionality becomes operational once the upgrade is complete and all nodes are running the new version. Once that has happened, there’s no way to return to operating in a backward compatible mode. Nodes running the previous version will not be allowed to join the fully-updated cluster.
192+
193+
In the unlikely case of a network malfunction during the upgrade process that isolates all remaining old nodes from the cluster, you must take the old nodes offline and upgrade them to enable them to join the cluster.
194+
195+
If you stop half or more of the master-eligible nodes all at once during the upgrade the cluster will become unavailable. You must upgrade and restart all of the stopped master-eligible nodes to allow the cluster to re-form. It might also be necessary to upgrade all other nodes running the old version to enable them to join the re-formed cluster.
196+
197+
Similarly, if you run a testing/development environment with a single master node it should be upgraded last. Restarting a single master node forces the cluster to be reformed. The new cluster will initially only have the upgraded master node and will thus reject the older nodes when they re-join the cluster. Nodes that have already been upgraded will successfully re-join the upgraded master.
198+
199+
200+
## Archived settings [archived-settings]
201+
202+
If you upgrade an {{es}} cluster that uses deprecated cluster or index settings that are not used in the target version, they are archived. We recommend you remove any archived settings after upgrading. For more information, see [Archived settings](../../../deploy-manage/upgrade/deployment-or-cluster/archived-settings.md).

0 commit comments

Comments
 (0)