<p>I have defined my service app running on port 9000. It is not web/http server it is simply just a service application running as windows service on that port to which other apps connect to (outside the container).
So I have defined Port 9000 in my service definition and in my config map definition. We are using NGINX as a proxy for accessing from outside and everything works.</p>
<p>Nginx Service:</p>
<pre><code>  - name: 9000-tcp
    nodePort: 30758
    port: 9000
    protocol: TCP
    targetPort: 9000
</code></pre>
<p>Config Map:</p>
<pre><code>apiVersion: v1
data:
  &quot;9000&quot;: default/frontarena-ads-aks-test:9000
kind: ConfigMap
</code></pre>
<p>Service definition:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: frontarena-ads-aks-test
spec:
  type: ClusterIP
  ports:
  - protocol: TCP
    port: 9000
  selector:
    app: frontarena-ads-aks-test
</code></pre>
<p>Ingress definition:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: ads-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: &quot;false&quot;
spec:
  rules:
    - http:
        paths:
          - path: /
            backend:
              serviceName: frontarena-ads-aks-test
              servicePort: 9000
</code></pre>
<p>As mentioned everything works. I know that TCP is used for L4 layer and HTTP for L7 Application Layer.
I need to access my  app from another app solely by its hostname and port. Without any HTTP Url.
So basically does it mean that I do NOT need actually my Ingress Controller definition at all?
I do not need to deploy it at all?
I would only need it if I need HTTP access with some URL for example: <code>hostname:port/pathA or hostname:port/pathB</code></p>
<p>Is that correct? For regular TCP connection we do not need at all our Ingress YAML definition? Thank you</p>

Veljko
<p>Yes, you don't need ingress at all in this case. According to kubernetes official doc, Ingress is:</p>
<blockquote>
<p>An API object that manages external access to the services in a cluster, typically HTTP.</p>
</blockquote>
<p>So, if you don't need any external access via http, you can omit ingress.</p>
<p>Ref: <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/</a></p>
