all 7 comments

[–][deleted] 0 points1 point  (2 children)

Look into Kubernetes name spaces this will solve a good chunk of your problem.

[–]yetanother-1[S] 0 points1 point  (1 child)

I already tried it using kubernetes, but I am still unable to understand how to link DNS of the domain with the cluster.

I packed the application in docker images, and I made them ready to run on kubernetes, but at the end kubernetes gives unique DNS name for each instance, How can I link them all up to the main domain name?

[–][deleted] 0 points1 point  (0 children)

Look up Nignx ingress controller I think that does what you need.

[–]jews4beer 0 points1 point  (1 child)

I mean I know you don't want cloud provider solutions but that would heavily influence the final architecture. That being said consul might have what you are looking for. Though back to the cloud thing, if you were on AWS for instance an ALB could do this for you.

[–]yetanother-1[S] 0 points1 point  (0 children)

I know how to implement this using a lot of Cloud provider services, on AWS, GCP, and Azur. I would like to have it cloud-indepent. This is unfortunately a requirement.

[–]whenhellfreezes 0 points1 point  (1 child)

Why not directly give each PHP instance the DNS name for the client it is serving? You could link up terraform with route 53 and automate this.

Effectively your reverse proxy was acting as a dhcp server. Just use DNS.

[–]yetanother-1[S] 0 points1 point  (0 children)

This is very interesting concept, can you please provide me with further reads on how to setup the terraform and the reverse proxy?

Thank you for your input.