Question: Assuming we have a physical Nginx server in the same environment as EK . . .

Shakeeb Khan:
Question:
Assuming we have a physical Nginx server in the same environment as EKS, and a client initiates an HTTP request on port 80 of the website, which is then forwarded to the reverse proxy (Nginx) which listens on port 80 and has the following configuration:


Nginx Conf File
server {
    listen       80;
    server_name  localhost;
    location / {
    # Update your backend application Kubernetes Cluster-IP Service name  and port below
    # proxy_pass http://<Backend-ClusterIp-Service-Name>:<Port>;
    proxy_pass <http://my-backend-service:8080>;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

  • In the context of the traffic flow from Nginx to the backend service, which is running on port 8080, specify whether the communication is occurring on the ClusterIP Port or the Target Port. Please assist how the traffic between Nginx-Reverse Proxy and Backend Service @8080

  • Which port will the traffic flow from Nginx to the backend service, the target port (8080) or the cluster IP port?

  • What Role (if any) do Node Port and Cluster IP have in this traffic movement.

Alistair Mackay:
This looks to me like you are trying to manually set up what the kubernetes nginx ingress controller does for you automatically when you create Ingress resources.

An external reverse proxy can’t connect to ClusterIP services, because they are only exposed internally. You could connect it to nodeport services, but every time anything changes you need to go and manually change the nginx config.

I do hope this is an experiment, since it’s not a good way to set up a proper working cluster. If you’re using EKS, you should make use of the tools AWS provides to connect your services to AWS load balancers to do cluster ingress.

Shakeeb Khan:
Yes it’s for testing purpose only and thanks for clearing my point.