0

I have a question about applying the ingress resource below: the address of the ingress in localhost. if I want to call the ingress address from within a pod it will not work. is there a way to get an absolute address? Thanks

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: vault-ingress
  annotations:
    nginx.ingress.kubernetes.io/use-regex: "true"
spec:
 rules:
  - HTTP:
     paths:
     - path: /v1/*
       backend:
        serviceName: vault
        servicePort: 8200
erez
  • 151
  • 2
  • 3
  • 9

1 Answers1

0

if I want to call the ingress address from within a pod it will not work

If your cluster has a default Ingress controller setup, you can obtain the address via kubectl get ing. If your cluster doesn't have a default Ingress controller setup, there will be no Ingress address available for you.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
gohm'c
  • 13,492
  • 1
  • 9
  • 16
  • Can you please elaborate what is default ingress controller setup and how to define it? Thanks I have ingress-nginx controller installed. – erez Dec 17 '21 at 04:41
  • If your cluster has an ingress controller annotated with `ingressclass.kubernetes.io/is-default-class`, the spec in your question will be automatically handled by this controller. If you are not sure, add this annotation to your spec in the question: `kubernetes.io/ingress.class: nginx`. This will direct ingress-nginx to handle your ingress request. – gohm'c Dec 17 '21 at 06:28