Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.05 KB

23-Ingress-Annotations-and-rewrite-target.md

File metadata and controls

37 lines (27 loc) · 1.05 KB

Ingress Annotations and rewrite-target

In this section, we will take a look at Ingress annotations and rewrite-target

  • Different Ingress controllers have different options to customize the way it works. Nginx Ingress Controller has many options but we will take a look into the one of the option "Rewrite Target" option.

  • Kubernetes Version 1.18

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  namespace: critical-space
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /pay
        backend:
          serviceName: pay-service
          servicePort: 8282

Reference Docs