Created
June 6, 2022 18:09
-
-
Save nginx-gists/b481f6cbffabce4c6df69005d7ea4345 to your computer and use it in GitHub Desktop.
Load Balancing TCP and UDP Traffic in Kubernetes with NGINX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: k8s.nginx.org/v1alpha1 | |
kind: GlobalConfiguration | |
metadata: | |
name: nginx-configuration | |
namespace: nginx-ingress | |
spec: | |
listeners: | |
- name: syslog-udp | |
port: 541 | |
protocol: UDP | |
- name: mysql-tcp | |
port: 5353 | |
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: k8s.nginx.org/v1alpha1 | |
kind: TransportServer | |
metadata: | |
name: mysql-tcp | |
spec: | |
listener: | |
name: mysql-tcp | |
protocol: TCP | |
upstreams: | |
- name: mysql-db | |
service: mysql | |
port: 3306 | |
action: | |
pass: mysql-db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a discussion of these files, see Load Balancing TCP and UDP Traffic in Kubernetes with NGINX