Skip to content

Instantly share code, notes, and snippets.

@nginx-gists
Created June 6, 2022 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nginx-gists/b481f6cbffabce4c6df69005d7ea4345 to your computer and use it in GitHub Desktop.
Save nginx-gists/b481f6cbffabce4c6df69005d7ea4345 to your computer and use it in GitHub Desktop.
Load Balancing TCP and UDP Traffic in Kubernetes with NGINX
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
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
@nginx-gists
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment