apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: bookstore-ingress-localhost
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  defaultBackend:
    service:
       name: frontend-service
       port:
         number: 80
  rules:
  -  host: localhost
     http:
      paths:
      - path: /listallbooks
        pathType: Prefix
        backend:
          service:
             name: listbook-service
             port:
               number: 80
      - path: /addnewbook
        pathType: Prefix
        backend:
          service:
             name: addbook-service
             port:
               number: 80
      - path: /showupdateform
        pathType: Prefix
        backend:
          service:
             name: updatebook-service
             port:
               number: 80
      - path: /updatebook
        pathType: Prefix
        backend:
          service:
             name: updatebook-service
             port:
               number: 80
      - path: /deletebook
        pathType: Prefix
        backend:
          service:
             name: deletebook-service
             port:
               number: 80

