Skip to content

Commit 9bd2beb

Browse files
authored
Merge pull request #22 from resizes/tcp_udp_ports
feat: add post and include Lucia and Dario in authors.yaml
2 parents 21e26c3 + 6be57a0 commit 9bd2beb

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

blog/authors.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,16 @@ wences:
2626
name: Wences Martínez
2727
title: Product Engineer
2828
url: https://www.linkedin.com/in/wences-martinez-suarez
29-
image_url: https://github.com/wencesms92.png
29+
image_url: https://github.com/wencesms92.png
30+
31+
lucia:
32+
name: Lucía López
33+
title: Junior Platform Engineer
34+
url: https://www.linkedin.com/in/lucía-lópez-barrero-88a786351
35+
image_url: https://github.com/lucialbmo01.png
36+
37+
dario:
38+
name: Darío Gutiérrez
39+
title: Junior Platform Engineer
40+
url: https://www.linkedin.com/in/dariogmori
41+
image_url: https://github.com/dariogmori.png

blog/post-tcp-udp-ports.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
slug: open-tcp-udp-same-port
3+
title: Easily open TCP and UDP protocols on the same port
4+
authors: lucia
5+
tags: [DevOps, PlatformEngineering, ALB, TCP, UDP, Kubernetes, Networking, AWS]
6+
image: img/2025-07-04-tcp-udp/image.jpg
7+
---
8+
If you’ve ever tried to expose both TCP and UDP on the same port using Kubernetes with AWS Load Balancers, you’ve probably run into a common limitation: you can only choose one protocol per port, which complicates applications that need both (such as real-time communications or gaming).
9+
10+
The good news is that AWS has released a feature that allows configuring listeners for both TCP and UDP on the same port, avoiding complex workarounds.
11+
12+
To implement this, it’s important to verify two things:
13+
- That your **AWS Load Balancer Controller** is version **v2.13.0 or higher**.
14+
- That the **Helm chart** is **1.13.0 or higher** to ensure compatibility.
15+
16+
Once that’s set, you only need to do two steps to enable both protocols on the same port:
17+
1. In the ALB Controller’s `values.yaml` file, add:
18+
```yaml
19+
controllerConfig:
20+
featureGates:
21+
EnableTCPUDPListener: true
22+
```
23+
2. In the LoadBalancer type Service manifest where you want to enable this functionality, add this annotation:
24+
```yaml
25+
service.beta.kubernetes.io/aws-load-balancer-enable-tcp-udp-listener: 'true'
26+
```
27+
After that, you just need to define the port twice in your Service: once for TCP and once for UDP. Here is a complete example of a Service manifest that opens the same port for both TCP and UDP:
28+
```yaml
29+
apiVersion: v1
30+
kind: Service
31+
metadata:
32+
name: ejemplo-tcp-udp
33+
annotations:
34+
service.beta.kubernetes.io/aws-load-balancer-enable-tcp-udp-listener: "true"
35+
spec:
36+
type: LoadBalancer
37+
selector:
38+
app: mi-aplicacion
39+
ports:
40+
- name: tcp-12345
41+
protocol: TCP
42+
port: 12345
43+
targetPort: 12345
44+
- name: udp-12345
45+
protocol: UDP
46+
port: 12345
47+
targetPort: 12345
48+
```
49+
50+
>⚠️ **If you already had the load balancer created and you add this functionality now, I recommend deleting it and recreating it** to ensure the configuration is applied correctly.
51+
52+
53+
### 💬 References
54+
This new feature addresses several community-reported issues, such as [#2759](https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2759) and [1608](https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/1608). I hope this is helpful to those following those threads!
156 KB
Loading

0 commit comments

Comments
 (0)