You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: input/kube-yaml/service-exposure.md
+79Lines changed: 79 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,84 @@ For configuration details, see [Listener resource][listener-resource].
119
119
**📌 NOTE**
120
120
There must be a `MATCHING-CONNECTOR` for the service to operate.
121
121
122
+
<a id="kube-creating-multikeylistener-yaml"></a>
123
+
## Creating a multi-key listener using YAML
124
+
<!--PROCEDURE-->
125
+
126
+
A multi-key listener binds a single local host and port to multiple routing keys in remote sites.
127
+
Use a multi-key listener when you want one service endpoint to aggregate traffic from multiple connectors.
128
+
129
+
With multi-key listeners, you must choose a strategy which determines how the traffic is distributed:
130
+
131
+
* priority - Uses the first routing key in list that is available for traffic. If the connector becomes unavailable, the listener matches with the next available routing key in list.
132
+
* weighted - Uses the routing keys in proportion to the assigned weights. For example, if `backend1` is assigned 25 and `backend2` is assigned 75, then only a quarter of the TCP connections are directed to `backend1`.
133
+
134
+
Multi-key listeners provide predictable traffic distribution from the client side and typically are not influenced by link costs.
135
+
136
+
For configuration details, see [MultiKeyListener resource][multikeylistener-resource].
137
+
138
+
**Prerequisites**
139
+
140
+
* Multiple connectors created with different routing keys. See [Creating a connector using YAML](#kube-creating-connector-yaml).
141
+
142
+
**Procedure**
143
+
144
+
1. Identify the connectors that you want to aggregate.
145
+
Note the routing keys for each connector.
146
+
147
+
2. Determine which strategy is best for your use case. For example, failover is best achieved using the `priority` strategy.
148
+
149
+
150
+
3. Create a multi-key listener resource YAML file.
151
+
For example:
152
+
```yaml
153
+
apiVersion: skupper.io/v2alpha1
154
+
kind: MultiKeyListener
155
+
metadata:
156
+
name: mkl-backend
157
+
spec:
158
+
host: mkl-backend
159
+
port: 9092
160
+
strategy:
161
+
weighted:
162
+
routingKeys:
163
+
east-backend: 1
164
+
west-backend: 1
165
+
```
166
+
This creates a listener named `mkl-backend` that exposes a single endpoint on port 9092 and distributes traffic evenly across the `east-backend` and `west-backend` routing keys.
167
+
168
+
To prefer one routing key first and fall back to another, use the `priority` strategy:
169
+
```yaml
170
+
apiVersion: skupper.io/v2alpha1
171
+
kind: MultiKeyListener
172
+
metadata:
173
+
name: mkl-backend-priority
174
+
spec:
175
+
host: mkl-backend-priority
176
+
port: 9095
177
+
strategy:
178
+
priority:
179
+
routingKeys:
180
+
- east-backend-http
181
+
- west-backend-http
182
+
```
183
+
184
+
To create the multi-key listener resource:
185
+
186
+
```bash
187
+
kubectl apply -f <filename>
188
+
```
189
+
190
+
where `<filename>` is the name of a YAML file that is saved on your local filesystem.
191
+
192
+
4. Check the multi-key listener status:
193
+
```bash
194
+
kubectl get multikeylistener
195
+
```
196
+
197
+
**📌 NOTE**
198
+
If you need to change strategy after you created a multi-key listener, you must delete and recreate the resource. This does not affect changing routing keys or weights.
199
+
122
200
<a id="kube-creating-attachedconnector-yaml"></a>
123
201
## Creating a connector for a different namespace using YAML
124
202
<!--PROCEDURE-->
@@ -200,3 +278,4 @@ For configuration details, see [Connector resource][connector-resource].
Copy file name to clipboardExpand all lines: input/refdog/commands/connector/create.md
+3-88Lines changed: 3 additions & 88 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,51 +63,9 @@ help for create
63
63
</div>
64
64
<divclass="attribute-body">
65
65
66
-
The hostname or IP address of the local connector
66
+
The hostname or IP address of the local connector (default "localhost") -r, --routing-key string The identifier used to route traffic from listeners to connectors
If true, include server pods that are not in the ready state. -r, --routing-key string The identifier used to route traffic from listeners to connectors
@@ -134,54 +92,11 @@ the name of a Kubernetes secret containing the generated or externally-supplied
134
92
</div>
135
93
<divclass="attribute-body">
136
94
137
-
The connector type. Choices: [tcp]. (default "tcp")
95
+
The connector type. Choices: [tcp]. (default "tcp")`````` -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
A Kubernetes resource name that identifies a workload expressed like resource-type/resource-name. Expected resource types: service, daemonset, deployment, and statefulset. `````` -c, --context string Set the kubeconfig context
Path to the kubeconfig file to use -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
Copy file name to clipboardExpand all lines: input/refdog/commands/connector/delete.md
+1-15Lines changed: 1 addition & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,25 +72,11 @@ raise an error if the operation does not complete in the given period of time (e
72
72
</div>
73
73
<divclass="attribute-body">
74
74
75
-
Wait for deletion to complete before exiting (default true) `````` -c, --context string Set the kubeconfig context
75
+
Wait for deletion to complete before exiting (default true) `````` -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
Path to the kubeconfig file to use -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
Copy file name to clipboardExpand all lines: input/refdog/commands/connector/generate.md
+3-59Lines changed: 3 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,23 +66,9 @@ help for generate
66
66
</div>
67
67
<divclass="attribute-body">
68
68
69
-
The hostname or IP address of the local connector
69
+
The hostname or IP address of the local connector (default "localhost") -o, --output string print resources to the console instead of submitting them to the Skupper controller. Choices: json, yaml (default "yaml")
If true, include server pods that are not in the ready state. -o, --output string print resources to the console instead of submitting them to the Skupper controller. Choices: json, yaml (default "yaml")
A Kubernetes label selector for specifying target server pods.
113
-
114
-
115
-
116
88
</div>
117
89
</div>
118
90
@@ -137,39 +109,11 @@ the name of a Kubernetes secret containing the generated or externally-supplied
137
109
</div>
138
110
<divclass="attribute-body">
139
111
140
-
The connector type. Choices: [tcp]. (default "tcp")
112
+
The connector type. Choices: [tcp]. (default "tcp")`````` -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
A Kubernetes resource name that identifies a workload expressed like resource-type/resource-name. Expected resource types: service, daemonset, deployment, and statefulset. `````` -c, --context string Set the kubeconfig context
Path to the kubeconfig file to use -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
Path to the kubeconfig file to use -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
58
+
help for status -o, --output string print status of connectors Choices: json, yaml `````` -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
0 commit comments