Home > front end >  Kubernetes pod Back-off restarting failed container with CrashLoopBack error
Kubernetes pod Back-off restarting failed container with CrashLoopBack error

Time:09-30

Github repo: enter image description here

the other services ran successfully, but the reverse proxy returned an error and when I investigated by running the command kubectl describe pod reverseproxy... I got this info enter image description here

CodePudding user response:

As David Maze very rightly pointed out, your problem is not reproducible. You haven't provided all the configuration files, for example. However, the error you received clearly tells about the problem:

host not found in upstream "udagram-users: 8080" in /etc/nginx/nginx.conf:11

This error makes it clear that you are trying to connect to host udagram-users: 8080 as defined in file /etc/nginx/nginx.conf on line 11.

And how can I solve it please?

You need to check the connection. (It is also possible that you entered the wrong hostname or port in the config). You mentioned that you are using multiple subnets:

it is using 5 subnets

In such a situation, it is very likely that there is no connection because the individual components operate on different networks and will never be able to communicate with each other. If you run all your containers on one network, it should work. If, on the other hand, you want to use multiple subnets, you need to ensure container-to-container communication across multiple subnets.

See also this similar problem with many possible solutions.

  • Related