Skip to content

Replciating kubernetes Ingress behaviour locally using nginx

Notifications You must be signed in to change notification settings

ShailyAggarwalK/nginx-ingress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Replicating Kubernetes Ingress locally using Nginx

Sample Application:

  • my-bank-nginx-proxy
    • runs on port 80
    • nginx app having html page - `index.yaml`
    • has 2 links: one pointing to customer app (8080) and other to employee app (8081)
    • Link to customer and employee apps is via relative path and url is not mentioned in index.html as nginx can handle it
  • my-bank-customer - runs on port 8080
  • my-bank-employee - runs on port 8081

Steps to run :

  1. replace <PATH_TO_REPO_ON_LOCAL> in my-bank/docker-compose.yaml
  2. run docker-compose.yaml using docker-compose up
  3. once up, access app at http://localhost:80 (app can also be accessed at my-bank.com if it is added in /etc/hosts)
  4. upon clicking on customer portal, app gets redirected to port 8080 via nginx proxy we created
  5. upon clicking on employee portal, app gets redirected to port 8081 via nginx proxy we created

More details here .

About

Replciating kubernetes Ingress behaviour locally using nginx

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published