You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am deploying a triton inference server on the Amazon Elastic Kubernetes Service (Amazon EKS) and using Nginx Open-Source Load Balancer for load-balancing. Our EKS Cluster is private (EKS Nodes are in private subnets) so that no one can access it from the outside world.
Since, triton inference server has three endpoints:-
port 8000: for HTTP requests
port 8001: for grpc requests
port 8002: Prometheus metrics server
First of all, I have created a deployment for Triton on AWS EKS and exposed it using clusterIP = None, so that all the replicas endpoints are exposed and identified by NGINX Load Balancer.
Then, I have created a image for nginx opensource load balancer using the below configuration. Configuration file for NGINX on EKS node at the location /etc/nginx/conf.d/nginx.conf.
resolver kube-dns.kube-system.svc.cluster.local valid=5s;
upstream backend {
zone upstream-backend 64k;
server triton.default.svc.cluster.local:8000;
}
upstream backendgrpc {
zone upstream-backend 64k;
server triton.default.svc.cluster.local:8001;
}
server {
listen 80;
location / {
proxy_pass http://backend/;
}
}
server {
listen 89 http2;
location / {
grpc_pass grpc://backendgrpc;
}
}
server {
listen 8080;
root /usr/share/nginx/html;
location = /dashboard.html { }
location = / {
return 302 /dashboard.html;
}
}
Dockerfile for Nginx Opensource LB is:-
FROM nginx
RUN rm /etc/nginx/conf.d/default.conf
COPY /etc/nginx/conf.d/nginx.conf /etc/nginx/conf.d/default.conf
I have created a ReplicationController for NGINX. To pull the image from the private registry, Kubernetes needs credentials.
The imagePullSecrets field in the configuration file specifies that Kubernetes should get the credentials from a Secret named ecr-cred.
Now, the issue which I am facing is, when the pods are increasing, the nginx load balancer is not doing the load balancing between those newly added pods.
Can anyone help me?
The text was updated successfully, but these errors were encountered:
MeghaVarshney21
changed the title
Why Nginx Opensource Load Balancer is not balancing the load between Triton Pods in EKS cluster?
Facing Issues with Load Balancing using NGINX Load Balancer on AWS EKS
Apr 13, 2022
resolver kube-dns.kube-system.svc.cluster.local valid=5s;
upstream backend {
zone upstream-backend 64k;
server triton.default.svc.cluster.local:8000;
}
NGINX OSS only resolves DNS names when it starts or when it is reloaded. That's why you see "Now, the issue which I am facing is, when the pods are increasing, the nginx load balancer is not doing the load balancing between those newly added pods."
Also note that for Kubernetes, we also have the Ingress Controller, which works both for NGINX and NGINX OSS and it will automatically update NGINX configuration when new backend pods are added. See https://github.com/nginxinc/kubernetes-ingress
I am deploying a triton inference server on the Amazon Elastic Kubernetes Service (Amazon EKS) and using Nginx Open-Source Load Balancer for load-balancing. Our EKS Cluster is private (EKS Nodes are in private subnets) so that no one can access it from the outside world.
Since, triton inference server has three endpoints:-
port 8000: for HTTP requests
port 8001: for grpc requests
port 8002: Prometheus metrics server
First of all, I have created a deployment for Triton on AWS EKS and exposed it using clusterIP = None, so that all the replicas endpoints are exposed and identified by NGINX Load Balancer.
Then, I have created a image for nginx opensource load balancer using the below configuration.
Configuration file for NGINX on EKS node at the location /etc/nginx/conf.d/nginx.conf.
Dockerfile for Nginx Opensource LB is:-
I have created a ReplicationController for NGINX. To pull the image from the private registry, Kubernetes needs credentials.
The imagePullSecrets field in the configuration file specifies that Kubernetes should get the credentials from a Secret named ecr-cred.
The nginx-rc file looks like:-
Now, the issue which I am facing is, when the pods are increasing, the nginx load balancer is not doing the load balancing between those newly added pods.
Can anyone help me?
The text was updated successfully, but these errors were encountered: