Exposing TCP and UDP services in nginx ingress
- 1 minutes read - 55 wordsAdd command line flags in ingress controller:
-
--tcp-services-configmap
-
--udp-services-configmap
Create configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: tcp-services
namespace: ingress-nginx
data:
5432: "default/postgres:5432"
Patch the ingress-nginx-controller to allow port 5432
spec:
template:
spec:
containers:
- name: controller
ports:
- containerPort: 6379
hostPort: 6379