Kubernetes - Configuring Angular to Work with a Backend API

5/29/2018

I have two containers Auth and Frontend. I have managed to get both the containers working independently, I need to establish the link between the two to send and receive HTTP requests.

Generally, the connections are made in angular like http://localhost:3000/auth/.

Note: Both are in different deployments and services.

Should I be using Ingress or Nginx?

-- Kishan M
angular
docker
kubernetes
python

2 Answers

5/29/2018

service will do the job, you just need to replace localhost with service name.

-- Kun Li
Source: StackOverflow

5/29/2018

If your Frontend angular application, needs to connect to the Auth application an the two run on different networks, then just use the IP of your host running the Auth container. If your app requires load balancing, security or you just want to add another level of abstraction and control you may use a proxy like Nginx.

-- b0gusb
Source: StackOverflow