KongIngress rule not applied

KongIngress configuration isn’t applied to the route and i’m wondering if i’m doing anything wrong or if the route shouldn’t be updated, why isn’t the rule applied?
I am able to overwrite the rule via admin API, but it is automatically restored back to the old value within few minutes.

Kong Ingress controller version 0.5
Kong version 1.2
Kubernetes version 1.13.7

I’ve created a KongIngress:
echo "apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: remove-strip-path
route:
methods:

  • POST
  • GET
    strip_path: false
    protocols:
  • http
  • https" | k apply -f -

Then applied it to an ingress:
ktest patch ingress alfresco-share-ingress -p ‘{“metadata”:{“annotations”:{“configuration.konghq.com”:“remove-strip-path”}}}’

So the ingress looks like this:
kubectl describe ing alfresco-share-ingress -n staging
Name: alfresco-share-ingress
Namespace: staging
Address: xx.xx.xx.xx
Default backend: default-http-backend:80 ()
TLS:
SNI routes xx.ee
SNI routes
Rules:
Host Path Backends


xx.ee
/share ths-alfresco-share:8080 ()
Annotations:
configuration.konghq.com: remove-strip-path
kubectl.kubernetes.io/last-applied-configuration: {“apiVersion”:“extensions/v1beta1”,“kind”:“Ingress”,“metadata”:{“annotations”:{},“name”:“alfresco-share-ingress”,“namespace”:“staging”},“spec”:{“rules”:[{“host”:“xx.ee”,“http”:{“paths”:[{“backend”:{“serviceName”:“ths-alfresco-share”,“servicePort”:8080},“path”:"/share"}]}}],“tls”:[{“hosts”:[“xx.ee”]},{“secretName”:null}]}}

Events:

But for some reason it’s not applied to the route:
{
“id”: “7cbe8649-8ee7-4b6d-8e18-8d1dc27f556c”,
“tags”: [
“managed-by-ingress-controller”
],
“paths”: [
“/share”
],
“destinations”: null,
“protocols”: [
“http”,
“https”
],
“created_at”: 1566310227,
“snis”: null,
“hosts”: [
“xx.ee”
],
“name”: “staging.alfresco-share-ingress.00”,
“preserve_host”: true,
“regex_priority”: 0,
“strip_path”: true,
“sources”: null,
“updated_at”: 1566310227,
“https_redirect_status_code”: 426,
“service”: {
“id”: “391f0c1d-7860-4f1d-951d-07ec15d40df5”
},
“methods”: null
}

It seems like your Ingress resource is in staging namespace and your KongIngress resource is created in the default namespace.
Please create your KongIngress resource in the same namespace as your Ingress resource.

If this fixes your problem, please mark the post as resolved by accepting this answer. Thanks!

Thanks a ton for the quick response, problem solved! :slight_smile:
Btw, is it possible to list these configurations (kongingresses) i’ve added?

kubectl get KongIngress --all-namespaces


© 2018 Kong Inc.    Terms  •  Privacy  •  FAQ