<p>I'm trying to figure out how port <code>1234</code> and <code>1235</code> is exposed when I add it to configMap. It works but I don't see a config to read these configMaps and expose the service.</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: tcp-services
  namespace: ingress-nginx
data:
  1234: &quot;test-web-dev/httpd:1234&quot;
  1235: &quot;test-web-dev/tomcat7:1235&quot;
---
kind: Service
apiVersion: v1
metadata:
  name: ingress-nginx
  namespace: ingress-nginx
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
spec:
  externalTrafficPolicy: Local
  type: LoadBalancer
  selector:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
  ports:
    - name: http
      port: 80
      protocol: TCP
      targetPort: http
    - name: https
      port: 443
      protocol: TCP
      targetPort: https

---
</code></pre>

user630702
<p>The ConfigMap is consumed by the Nginx Ingress, as can be found here: <a href="https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/</a></p>
<p>Usually you would have to define how the ConfigMap data is used by yourself, but the developers of the Nginx Ingress already did that for you, so you just have to provide the ConfigMap.</p>
