application-gateway-kubernetes-ingress
application-gateway-kubernetes-ingress copied to clipboard
Path Based Routing is not working Properly
Describe the bug When i use pathType: ImplementationSpecific, it is being routed to one of the path I mentioned there(provided I don't give any paths explicitly), no matter what path i give to the host & when i use the pathtype: Prefix, it is always redirecting to alerta and not routing to grafana, even though i gave correct path
To Reproduce* Steps to reproduce the behavior:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: azure/application-gateway
appgw.ingress.kubernetes.io/backend-path-prefix: /
namespace: monitoring
name: guidebook
spec:
defaultBackend:
service:
name: alerta-alerta-web
port:
number: 80
rules:
- host: genix-health-hub.westeurope.cloudapp.azure.com
http:
paths:
- backend:
service:
name: alerta-alerta-web
port:
number: 80
path: /alerta*
pathType: Prefix
- backend:
service:
name: prometheus-monitoring-grafana
port:
number: 80
path: /grafana*
pathType: Prefix
Ingress Controller details
- Output of
kubectl describe pod <ingress controller
> . Thepod name can be obtained by running helm list
. - Name: ingress-azure-b9f9fc67b-k7hkb
Namespace: default
Priority: 0
Service Account: ingress-azure
Node: aks-userpool-41561070-vmss000001/178.0.0.63
Start Time: Mon, 17 Apr 2023 17:36:42 +0000
Labels: aadpodidbinding=ingress-azure
app=ingress-azure
pod-template-hash=b9f9fc67b
release=ingress-azure
Annotations: checksum/config: 6b6b9585b05c2aae16e4e95d99442b7cb2f004bd3c7e4f7cc1f59298e7a89f9b
prometheus.io/port: 8123
prometheus.io/scrape: true
Status: Running
IP: 178.0.0.127
IPs:
IP: 178.0.0.127
Controlled By: ReplicaSet/ingress-azure-b9f9fc67b
Containers:
ingress-azure:
Container ID: containerd://803c8066a8181cbf74435b2b2e708e80f6265c84ce3a0aee3b1b18d60df6bd2b
Image: mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.6.0
Image ID: mcr.microsoft.com/azure-application-gateway/kubernetes-ingress@sha256:bccaa701e2dfeaaab978035e16f384d02824191489c95181865a94a38adde407
Port:
Host Port: State: Running Started: Mon, 17 Apr 2023 17:36:46 +0000 Ready: True Restart Count: 0 Liveness: http-get http://:8123/health/alive delay=15s timeout=1s period=20s #success=1 #failure=3 Readiness: http-get http://:8123/health/ready delay=5s timeout=1s period=10s #success=1 #failure=3 Environment Variables from: ingress-azure ConfigMap Optional: false Environment: AZURE_CLOUD_PROVIDER_LOCATION: /etc/appgw/azure.json AGIC_POD_NAME: ingress-azure-b9f9fc67b-k7hkb (v1:metadata.name) AGIC_POD_NAMESPACE: default (v1:metadata.namespace) Mounts: /etc/appgw/ from azure (ro) /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-b2vww (ro) Conditions: Type Status Initialized True Ready True ContainersReady True PodScheduled True Volumes: azure: Type: HostPath (bare host directory volume) Path: /etc/kubernetes/ HostPathType: Directory kube-api-access-b2vww: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: DownwardAPI: true QoS Class: BestEffort Node-Selectors: Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events:
were you able to fix this? I am also facing this issue.