<p>Is there a method to define rule priority within the Azure Application Gateway?</p>
<p>I've defined an ingress object in my Kubernetes cluster as follows:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress
  annotations:
    appgw.ingress.kubernetes.io/rule-priority: &quot;100&quot;
spec:
  ingressClassName: azure-application-gateway
  rules:
  - host: foo.bar.io
    http:
      paths:
      - path: /
        backend:
          service:
            name: type
            port:
              number: 80
        pathType: Exact
</code></pre>
<p>This setup generates a listener and an associated rule, which works just fine. However, it appears that the annotation <code>appgw.ingress.kubernetes.io/rule-priority: &quot;100&quot;</code> doesn't have any effect.</p>
<p>When I inspect the rule in the console, it displays 19000 instead of 100.</p>
<p>I'm now wondering if the rule priority might be configured elsewhere or if I'm using the incorrect annotation altogether, as I don't find it listed among the supported <a href="https://azure.github.io/application-gateway-kubernetes-ingress/annotations/" rel="nofollow noreferrer">annotations.</a></p>
<p>Is it possible to set the rule-priority from the ingress definition or is this done somewhere else entirely?</p>

Metro
<p>I compared with your list <a href="https://azure.github.io/application-gateway-kubernetes-ingress/annotations/" rel="nofollow noreferrer">annotation</a>, even as per <a href="https://learn.microsoft.com/en-us/azure/application-gateway/ingress-controller-annotations#rewrite-rule-set" rel="nofollow noreferrer">MsDoc</a> it is not listed.</p>
<p>You can edit or modify your priority value from the console like below:</p>
<p><img src="https://i.imgur.com/FTF2n2d.png" alt="enter image description here" /></p>
<p>Alternatively, you can also try setting up rule priority between 1 and 20000 (1 = highest priority, 20000=lowest priority) as per below script by <em>megabit</em></p>
<pre><code>$AppGW = Get-AzApplicationGateway -Name &quot;&lt;APPGATEWAYNAME&gt;&quot; -ResourceGroupName &quot;&lt;RGName&gt;&quot;
$Rules = Get-AzApplicationGatewayRequestRoutingRule -ApplicationGateway $AppGW

$i = 1000
foreach ($Rule in $Rules) {
    $Rule.Priority = $i
    $i++
}
Set-AzApplicationGateway -ApplicationGateway $AppGw
</code></pre>
