V
V
Vadim2021-10-24 19:21:43
Nginx
Vadim, 2021-10-24 19:21:43

Why does one nginx controller point to another via default backend?

there is a kubernetes server in the Amazon cloud (not eks) - I'm trying to understand and understand the nginx ingress controller configuration - 2 things are not entirely clear. Here is an excerpt from the nginx controller configuration (from nginx.conf)

{
server_name service1.cluster.ourcompany.ru
listen 80;
..........
..........


proxy_pass http://upstream-default-backend;
}

{
server_name service2.cluster.ourcompany.ru
listen 80;
..........
..........


proxy_pass http://upstream-default-backend;
}

upstream upstream-default-backend {
  # Load balance algorithm; empty for round robin, which is the default
    least_conn;
    keepalive 32;
    server 100.116.8.9:8080 max_fails=0 fail_timeout=0;
}


1. Why do you need to additionally create a default backend? I looked, in this case, another nginx controller is running on the IP address 100.116.8.9 (there is no console access to it - a greatly truncated version).
2. Do I understand correctly that routing in a kubernetes cluster first comes to the load balancer, then goes to the nginx ingress controller pod, and then cools down through the corresponding service to one of the pods?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question