Skip to content

Commit 5682aab

Browse files
committed
targetPort and reviewing suggestions
1 parent 0757296 commit 5682aab

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

deploy-manage/remote-clusters/_snippets/eck_rcs_expose.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,10 @@ When the remote cluster server is enabled, ECK automatically creates a Kubernete
22

33
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.
44

5-
::::{applies-switch}
5+
:::::{applies-switch}
66

7-
:::{applies-item} eck: ga 3.0
8-
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`:
12-
13-
```sh
14-
kubectl expose service quickstart-es-remote-cluster \
15-
--name=quickstart-es-remote-cluster-lb \
16-
--type=LoadBalancer \ <1>
17-
--port=9443 --target-port=9443
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.
20-
21-
:::
22-
23-
:::{applies-item} eck: ga 3.3
24-
25-
You can expose the remote cluster service directly from the {{es}} resource manifest. By default, this service is exposed on port 9443.
7+
::::{applies-item} eck: ga 3.3
8+
You can customize how the remote cluster service is exposed by overriding its service specification directly under `spec.remoteClusterServer.service` in the {{es}} resource. By default, this service listens on port 9443.
269

2710
```yaml
2811
apiVersion: elasticsearch.k8s.elastic.co/v1
@@ -43,6 +26,26 @@ spec:
4326
...
4427
```
4528
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.
46-
:::
4729
::::
4830

31+
::::{applies-item} eck: ga 3.0
32+
33+
In ECK 3.2 and earlier, you can't 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.
34+
35+
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`:
36+
37+
```sh
38+
kubectl expose service quickstart-es-remote-cluster \
39+
--name=quickstart-es-remote-cluster-lb \
40+
--type=LoadBalancer \ <1>
41+
--port=9443 --target-port=9443
42+
```
43+
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.
44+
45+
::::
46+
:::::
47+
48+
:::{warning}
49+
If you change the service’s `port`, set `targetPort` explicitly to `9443`, which is the default remote cluster server listening port. Otherwise, Kubernetes uses the same value for both fields, resulting in failed connections.
50+
:::
51+

0 commit comments

Comments
 (0)