|
1 | | -When the remote cluster server is enabled, ECK automatically creates a Kubernetes service named `<cluster-name>-es-remote-cluster` that exposes the server internally on port `9443`: |
| 1 | +When the remote cluster server is enabled, ECK automatically creates a Kubernetes service named `<cluster-name>-es-remote-cluster` that exposes the server internally on port `9443`. |
2 | 2 |
|
3 | | -```sh |
4 | | -quickstart-es-remote-cluster ClusterIP None <none> 9443/TCP 4h13m |
5 | | -``` |
| 3 | +To allow clusters running outside your Kubernetes environment to connect to this {{es}} cluster, you must expose this service externally. The way to expose this service depends on your ECK version. |
| 4 | + |
| 5 | +::::{applies-switch} |
6 | 6 |
|
7 | | -To allow other clusters running outside your Kubernetes environment to connect, you must expose this service externally. As of ECK {{version.eck}}, you cannot customize the service that ECK generates for the remote cluster interface, but you can create your own `LoadBalancer` service, `Ingress` object, or use another method available in your environment. |
| 7 | +:::{applies-item} eck: ga 3.0 |
8 | 8 |
|
9 | | -For example, the following command creates a service named `quickstart-es-remote-cluster-lb`, similar to the managed `quickstart-es-remote-cluster` but of type `LoadBalancer`. |
| 9 | +In ECK 3.2 and earlier you cannot customize the service that ECK generates for the remote cluster interface, but you can create your own `LoadBalancer` service, `Ingress` object, or use another method available in your environment. |
| 10 | + |
| 11 | +For example, for a cluster named `quickstart`, the following command creates a separate `LoadBalancer` service named `quickstart-es-remote-cluster-lb`, pointing to the ECK-managed service `quickstart-es-remote-cluster`: |
10 | 12 |
|
11 | 13 | ```sh |
12 | 14 | kubectl expose service quickstart-es-remote-cluster \ |
13 | 15 | --name=quickstart-es-remote-cluster-lb \ |
14 | 16 | --type=LoadBalancer \ <1> |
15 | 17 | --port=9443 --target-port=9443 |
16 | 18 | ``` |
17 | | - |
18 | 19 | 1. On cloud providers that support external load balancers, setting the type to `LoadBalancer` provisions a load balancer for your service. Alternatively, expose the service `<cluster-name>-es-remote-cluster` through one of the Kubernetes Ingress controllers that support TCP services. |
19 | 20 |
|
| 21 | +::: |
20 | 22 |
|
21 | | -:::{admonition} About exposing the service and TLS certificates |
22 | | -When exposing the remote cluster service, determine which TLS certificate will be presented to clients and whether a certificate authority (CA) is required to establish trust. This depends on how traffic to port `9443` is routed in your environment and which component terminates the TLS connection: |
23 | | - |
24 | | -* **{{es}} TLS termination** |
25 | | - |
26 | | - If the connection reaches the {{es}} Pods without intermediate TLS termination, the {{es}} nodes present transport certificates managed by ECK. The local cluster must therefore trust these certificates by including the ECK-managed transport CA, which you can retrieve in the next section. |
27 | | - |
28 | | - This setup is typical when using standard `LoadBalancer` services provided by most cloud providers. |
29 | | - |
30 | | -* **External TLS termination** |
| 23 | +:::{applies-item} eck: ga 3.3 |
| 24 | + |
| 25 | +Starting in ECK 3.3, you can customize the service used for the remote cluster interface directly in the {{es}} resource. This allows you to choose the `Service` type or apply any supported `spec` fields without creating a separate Kubernetes Service. |
| 26 | + |
| 27 | +For example, the manifest below configures the remote cluster service as a `LoadBalancer`: |
| 28 | + |
| 29 | +```yaml |
| 30 | +apiVersion: elasticsearch.k8s.elastic.co/v1 |
| 31 | +kind: Elasticsearch |
| 32 | +metadata: |
| 33 | + name: <cluster-name> |
| 34 | + namespace: <namespace> |
| 35 | +spec: |
| 36 | + version: 9.2.1 |
| 37 | + remoteClusterServer: |
| 38 | + enabled: true |
| 39 | + service: |
| 40 | + type: LoadBalancer <1> |
| 41 | + nodeSets: |
| 42 | + - name: default |
| 43 | + count: 3 |
| 44 | + ... |
| 45 | + ... |
| 46 | +``` |
| 47 | +1. On cloud providers that support external load balancers, setting the type to `LoadBalancer` provisions a load balancer for your service. Alternatively, expose the service `<cluster-name>-es-remote-cluster` through one of the Kubernetes Ingress controllers that support TCP services. |
31 | 48 |
|
32 | | - If the connection to port `9443` of your {{es}} cluster is handled by an external load balancer, Ingress controller, or another proxy that performs SSL termination with its own certificates, use the CA associated with that component if it's signed by a private CA. |
33 | | - |
34 | | - If the external TLS termination uses a publicly trusted certificate, no additional CA is needed. |
| 49 | +You can also configure other service types (such as `NodePort`) or attach annotations required by your environment. |
35 | 50 | ::: |
| 51 | +:::: |
36 | 52 |
|
0 commit comments