Kubernetes nginx ingress 0.22 not respecting cookie affinity annotation?Kubernetes Nginx Ingress Controller expose Nginx WebserverKubernetes nginx Ingress configuration not working for GrafanaNginx ingress controller modsecurityKubernetes ingress nginx not matching sub pathsK8s Helm - Jenkins with Nginx IngressNGINX Ingress controller not updating affinity cookiekubernetes not creating the ELB for ingress-nginx controllerKubernetes Nginx Ingress not finding service endpointHow can I correctly setup custom headers with nginx ingress?Using Session Affinity (Cookies) with SSL Passthrough on NGINX-Ingress

Are Captain Marvel's powers affected by Thanos breaking the Tesseract and claiming the stone?

How to explain what's wrong with this application of the chain rule?

The Digit Triangles

PTIJ: Why is Haman obsessed with Bose?

A Trivial Diagnosis

Quoting Keynes in a lecture

I found an audio circuit and I built it just fine, but I find it a bit too quiet. How do I amplify the output so that it is a bit louder?

How do you make your own symbol when Detexify fails?

Is it necessary to use pronouns with the verb "essere"?

Shouldn’t conservatives embrace universal basic income?

How to make money from a browser who sees 5 seconds into the future of any web page?

What is the difference between lands and mana?

Microchip documentation does not label CAN buss pins on micro controller pinout diagram

Does the reader need to like the PoV character?

What to do when eye contact makes your coworker uncomfortable?

What is Cash Advance APR?

What does Apple's new App Store requirement mean

A variation to the phrase "hanging over my shoulders"

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

How much theory knowledge is actually used while playing?

Can you use Vicious Mockery to win an argument or gain favours?

Stack Interview Code methods made from class Node and Smart Pointers

Mimic lecturing on blackboard, facing audience

What kind of floor tile is this?



Kubernetes nginx ingress 0.22 not respecting cookie affinity annotation?


Kubernetes Nginx Ingress Controller expose Nginx WebserverKubernetes nginx Ingress configuration not working for GrafanaNginx ingress controller modsecurityKubernetes ingress nginx not matching sub pathsK8s Helm - Jenkins with Nginx IngressNGINX Ingress controller not updating affinity cookiekubernetes not creating the ELB for ingress-nginx controllerKubernetes Nginx Ingress not finding service endpointHow can I correctly setup custom headers with nginx ingress?Using Session Affinity (Cookies) with SSL Passthrough on NGINX-Ingress













0















We recently upgraded to nginx-ingress 0.22. Before this upgrade, my service was using the old namespace ingress.kubernetes.io/affinity: cookie and everything was working as I expected. However, upon the upgrade to 0.22, affinity stopped being applied to my service (I don't see sticky anywhere in the nginx.conf).



I looked at the docs and changed the namespace to nginx.ingress.kubernetes.io as shown in this example, but it didn't help.



Is there some debug log I can look at that will show the configuration parsing/building process? My guess is that some other setting is preventing this from working (I can't imagine the k8s team shipped a release with this feature completely broken), but I'm not sure what that could be.



My ingress config as shown by the k8s dashboard follows:



 "kind": "Ingress",
"apiVersion": "extensions/v1beta1",
"metadata":
"name": "example-ingress",
"namespace": "master",
"selfLink": "/apis/extensions/v1beta1/namespaces/master/ingresses/example-ingress",
"uid": "01e81627-3b90-11e9-bb5a-f6bc944a4132",
"resourceVersion": "23345275",
"generation": 1,
"creationTimestamp": "2019-02-28T19:35:30Z",
"labels":
,
"annotations":
"ingress.kubernetes.io/backend-protocol": "HTTPS",
"ingress.kubernetes.io/limit-rps": "100",
"ingress.kubernetes.io/proxy-body-size": "100m",
"ingress.kubernetes.io/proxy-read-timeout": "60",
"ingress.kubernetes.io/proxy-send-timeout": "60",
"ingress.kubernetes.io/secure-backends": "true",
"ingress.kubernetes.io/secure-verify-ca-secret": "example-ingress-ssl",
"kubernetes.io/ingress.class": "nginx",
"nginx.ingress.kubernetes.io/affinity": "cookie",
"nginx.ingress.kubernetes.io/backend-protocol": "HTTPS",
"nginx.ingress.kubernetes.io/limit-rps": "100",
"nginx.ingress.kubernetes.io/proxy-body-size": "100m",
"nginx.ingress.kubernetes.io/proxy-buffer-size": "8k",
"nginx.ingress.kubernetes.io/proxy-read-timeout": "60",
"nginx.ingress.kubernetes.io/proxy-send-timeout": "60",
"nginx.ingress.kubernetes.io/secure-verify-ca-secret": "example-ingress-ssl",
"nginx.ingress.kubernetes.io/session-cookie-expires": "172800",
"nginx.ingress.kubernetes.io/session-cookie-max-age": "172800",
"nginx.ingress.kubernetes.io/session-cookie-name": "route",
"nginx.org/websocket-services": "example"

,
"spec":
"tls": [

"hosts": [
"*.example.net"
],
"secretName": "example-ingress-ssl"

],
"rules": [

"host": "*.example.net",
"http":
"paths": [

"path": "/",
"backend":
"serviceName": "example",
"servicePort": 443


]


]
,
"status":
"loadBalancer":
"ingress": [

]


}









share|improve this question




























    0















    We recently upgraded to nginx-ingress 0.22. Before this upgrade, my service was using the old namespace ingress.kubernetes.io/affinity: cookie and everything was working as I expected. However, upon the upgrade to 0.22, affinity stopped being applied to my service (I don't see sticky anywhere in the nginx.conf).



    I looked at the docs and changed the namespace to nginx.ingress.kubernetes.io as shown in this example, but it didn't help.



    Is there some debug log I can look at that will show the configuration parsing/building process? My guess is that some other setting is preventing this from working (I can't imagine the k8s team shipped a release with this feature completely broken), but I'm not sure what that could be.



    My ingress config as shown by the k8s dashboard follows:



     "kind": "Ingress",
    "apiVersion": "extensions/v1beta1",
    "metadata":
    "name": "example-ingress",
    "namespace": "master",
    "selfLink": "/apis/extensions/v1beta1/namespaces/master/ingresses/example-ingress",
    "uid": "01e81627-3b90-11e9-bb5a-f6bc944a4132",
    "resourceVersion": "23345275",
    "generation": 1,
    "creationTimestamp": "2019-02-28T19:35:30Z",
    "labels":
    ,
    "annotations":
    "ingress.kubernetes.io/backend-protocol": "HTTPS",
    "ingress.kubernetes.io/limit-rps": "100",
    "ingress.kubernetes.io/proxy-body-size": "100m",
    "ingress.kubernetes.io/proxy-read-timeout": "60",
    "ingress.kubernetes.io/proxy-send-timeout": "60",
    "ingress.kubernetes.io/secure-backends": "true",
    "ingress.kubernetes.io/secure-verify-ca-secret": "example-ingress-ssl",
    "kubernetes.io/ingress.class": "nginx",
    "nginx.ingress.kubernetes.io/affinity": "cookie",
    "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS",
    "nginx.ingress.kubernetes.io/limit-rps": "100",
    "nginx.ingress.kubernetes.io/proxy-body-size": "100m",
    "nginx.ingress.kubernetes.io/proxy-buffer-size": "8k",
    "nginx.ingress.kubernetes.io/proxy-read-timeout": "60",
    "nginx.ingress.kubernetes.io/proxy-send-timeout": "60",
    "nginx.ingress.kubernetes.io/secure-verify-ca-secret": "example-ingress-ssl",
    "nginx.ingress.kubernetes.io/session-cookie-expires": "172800",
    "nginx.ingress.kubernetes.io/session-cookie-max-age": "172800",
    "nginx.ingress.kubernetes.io/session-cookie-name": "route",
    "nginx.org/websocket-services": "example"

    ,
    "spec":
    "tls": [

    "hosts": [
    "*.example.net"
    ],
    "secretName": "example-ingress-ssl"

    ],
    "rules": [

    "host": "*.example.net",
    "http":
    "paths": [

    "path": "/",
    "backend":
    "serviceName": "example",
    "servicePort": 443


    ]


    ]
    ,
    "status":
    "loadBalancer":
    "ingress": [

    ]


    }









    share|improve this question


























      0












      0








      0








      We recently upgraded to nginx-ingress 0.22. Before this upgrade, my service was using the old namespace ingress.kubernetes.io/affinity: cookie and everything was working as I expected. However, upon the upgrade to 0.22, affinity stopped being applied to my service (I don't see sticky anywhere in the nginx.conf).



      I looked at the docs and changed the namespace to nginx.ingress.kubernetes.io as shown in this example, but it didn't help.



      Is there some debug log I can look at that will show the configuration parsing/building process? My guess is that some other setting is preventing this from working (I can't imagine the k8s team shipped a release with this feature completely broken), but I'm not sure what that could be.



      My ingress config as shown by the k8s dashboard follows:



       "kind": "Ingress",
      "apiVersion": "extensions/v1beta1",
      "metadata":
      "name": "example-ingress",
      "namespace": "master",
      "selfLink": "/apis/extensions/v1beta1/namespaces/master/ingresses/example-ingress",
      "uid": "01e81627-3b90-11e9-bb5a-f6bc944a4132",
      "resourceVersion": "23345275",
      "generation": 1,
      "creationTimestamp": "2019-02-28T19:35:30Z",
      "labels":
      ,
      "annotations":
      "ingress.kubernetes.io/backend-protocol": "HTTPS",
      "ingress.kubernetes.io/limit-rps": "100",
      "ingress.kubernetes.io/proxy-body-size": "100m",
      "ingress.kubernetes.io/proxy-read-timeout": "60",
      "ingress.kubernetes.io/proxy-send-timeout": "60",
      "ingress.kubernetes.io/secure-backends": "true",
      "ingress.kubernetes.io/secure-verify-ca-secret": "example-ingress-ssl",
      "kubernetes.io/ingress.class": "nginx",
      "nginx.ingress.kubernetes.io/affinity": "cookie",
      "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS",
      "nginx.ingress.kubernetes.io/limit-rps": "100",
      "nginx.ingress.kubernetes.io/proxy-body-size": "100m",
      "nginx.ingress.kubernetes.io/proxy-buffer-size": "8k",
      "nginx.ingress.kubernetes.io/proxy-read-timeout": "60",
      "nginx.ingress.kubernetes.io/proxy-send-timeout": "60",
      "nginx.ingress.kubernetes.io/secure-verify-ca-secret": "example-ingress-ssl",
      "nginx.ingress.kubernetes.io/session-cookie-expires": "172800",
      "nginx.ingress.kubernetes.io/session-cookie-max-age": "172800",
      "nginx.ingress.kubernetes.io/session-cookie-name": "route",
      "nginx.org/websocket-services": "example"

      ,
      "spec":
      "tls": [

      "hosts": [
      "*.example.net"
      ],
      "secretName": "example-ingress-ssl"

      ],
      "rules": [

      "host": "*.example.net",
      "http":
      "paths": [

      "path": "/",
      "backend":
      "serviceName": "example",
      "servicePort": 443


      ]


      ]
      ,
      "status":
      "loadBalancer":
      "ingress": [

      ]


      }









      share|improve this question
















      We recently upgraded to nginx-ingress 0.22. Before this upgrade, my service was using the old namespace ingress.kubernetes.io/affinity: cookie and everything was working as I expected. However, upon the upgrade to 0.22, affinity stopped being applied to my service (I don't see sticky anywhere in the nginx.conf).



      I looked at the docs and changed the namespace to nginx.ingress.kubernetes.io as shown in this example, but it didn't help.



      Is there some debug log I can look at that will show the configuration parsing/building process? My guess is that some other setting is preventing this from working (I can't imagine the k8s team shipped a release with this feature completely broken), but I'm not sure what that could be.



      My ingress config as shown by the k8s dashboard follows:



       "kind": "Ingress",
      "apiVersion": "extensions/v1beta1",
      "metadata":
      "name": "example-ingress",
      "namespace": "master",
      "selfLink": "/apis/extensions/v1beta1/namespaces/master/ingresses/example-ingress",
      "uid": "01e81627-3b90-11e9-bb5a-f6bc944a4132",
      "resourceVersion": "23345275",
      "generation": 1,
      "creationTimestamp": "2019-02-28T19:35:30Z",
      "labels":
      ,
      "annotations":
      "ingress.kubernetes.io/backend-protocol": "HTTPS",
      "ingress.kubernetes.io/limit-rps": "100",
      "ingress.kubernetes.io/proxy-body-size": "100m",
      "ingress.kubernetes.io/proxy-read-timeout": "60",
      "ingress.kubernetes.io/proxy-send-timeout": "60",
      "ingress.kubernetes.io/secure-backends": "true",
      "ingress.kubernetes.io/secure-verify-ca-secret": "example-ingress-ssl",
      "kubernetes.io/ingress.class": "nginx",
      "nginx.ingress.kubernetes.io/affinity": "cookie",
      "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS",
      "nginx.ingress.kubernetes.io/limit-rps": "100",
      "nginx.ingress.kubernetes.io/proxy-body-size": "100m",
      "nginx.ingress.kubernetes.io/proxy-buffer-size": "8k",
      "nginx.ingress.kubernetes.io/proxy-read-timeout": "60",
      "nginx.ingress.kubernetes.io/proxy-send-timeout": "60",
      "nginx.ingress.kubernetes.io/secure-verify-ca-secret": "example-ingress-ssl",
      "nginx.ingress.kubernetes.io/session-cookie-expires": "172800",
      "nginx.ingress.kubernetes.io/session-cookie-max-age": "172800",
      "nginx.ingress.kubernetes.io/session-cookie-name": "route",
      "nginx.org/websocket-services": "example"

      ,
      "spec":
      "tls": [

      "hosts": [
      "*.example.net"
      ],
      "secretName": "example-ingress-ssl"

      ],
      "rules": [

      "host": "*.example.net",
      "http":
      "paths": [

      "path": "/",
      "backend":
      "serviceName": "example",
      "servicePort": 443


      ]


      ]
      ,
      "status":
      "loadBalancer":
      "ingress": [

      ]


      }






      kubernetes kubernetes-ingress nginx-ingress






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 9 at 14:57









      webwurst

      3,44921828




      3,44921828










      asked Mar 7 at 23:54









      anisopteraanisoptera

      901616




      901616






















          1 Answer
          1






          active

          oldest

          votes


















          1














          As I tested Sticky session affinity with Nginx Ingress version 0.22, I can assure that it works just fine. Then when I was looking for your configuration, I replaced wildcard host host: "*.example.net" with i.e host: "stickyingress.example.net" just to ignore wildcard, and it worked fine again.
          So after some search I found out that from this issue




          Wildcard hostnames are not supported by the Ingress spec (only SSL
          wildcard certificates are)




          Even this issue was opened for NGINX Ingress controller version:
          0.21.0






          share|improve this answer























          • Ah, thanks for this find. Extremely unfortunate though. Guess I'm going to have to do the "deploy a separate ingress instance" solution mentioned in that issue...

            – anisoptera
            Mar 11 at 19:55










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55054681%2fkubernetes-nginx-ingress-0-22-not-respecting-cookie-affinity-annotation%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          As I tested Sticky session affinity with Nginx Ingress version 0.22, I can assure that it works just fine. Then when I was looking for your configuration, I replaced wildcard host host: "*.example.net" with i.e host: "stickyingress.example.net" just to ignore wildcard, and it worked fine again.
          So after some search I found out that from this issue




          Wildcard hostnames are not supported by the Ingress spec (only SSL
          wildcard certificates are)




          Even this issue was opened for NGINX Ingress controller version:
          0.21.0






          share|improve this answer























          • Ah, thanks for this find. Extremely unfortunate though. Guess I'm going to have to do the "deploy a separate ingress instance" solution mentioned in that issue...

            – anisoptera
            Mar 11 at 19:55















          1














          As I tested Sticky session affinity with Nginx Ingress version 0.22, I can assure that it works just fine. Then when I was looking for your configuration, I replaced wildcard host host: "*.example.net" with i.e host: "stickyingress.example.net" just to ignore wildcard, and it worked fine again.
          So after some search I found out that from this issue




          Wildcard hostnames are not supported by the Ingress spec (only SSL
          wildcard certificates are)




          Even this issue was opened for NGINX Ingress controller version:
          0.21.0






          share|improve this answer























          • Ah, thanks for this find. Extremely unfortunate though. Guess I'm going to have to do the "deploy a separate ingress instance" solution mentioned in that issue...

            – anisoptera
            Mar 11 at 19:55













          1












          1








          1







          As I tested Sticky session affinity with Nginx Ingress version 0.22, I can assure that it works just fine. Then when I was looking for your configuration, I replaced wildcard host host: "*.example.net" with i.e host: "stickyingress.example.net" just to ignore wildcard, and it worked fine again.
          So after some search I found out that from this issue




          Wildcard hostnames are not supported by the Ingress spec (only SSL
          wildcard certificates are)




          Even this issue was opened for NGINX Ingress controller version:
          0.21.0






          share|improve this answer













          As I tested Sticky session affinity with Nginx Ingress version 0.22, I can assure that it works just fine. Then when I was looking for your configuration, I replaced wildcard host host: "*.example.net" with i.e host: "stickyingress.example.net" just to ignore wildcard, and it worked fine again.
          So after some search I found out that from this issue




          Wildcard hostnames are not supported by the Ingress spec (only SSL
          wildcard certificates are)




          Even this issue was opened for NGINX Ingress controller version:
          0.21.0







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 11 at 15:28









          coolinuxoidcoolinuxoid

          5098




          5098












          • Ah, thanks for this find. Extremely unfortunate though. Guess I'm going to have to do the "deploy a separate ingress instance" solution mentioned in that issue...

            – anisoptera
            Mar 11 at 19:55

















          • Ah, thanks for this find. Extremely unfortunate though. Guess I'm going to have to do the "deploy a separate ingress instance" solution mentioned in that issue...

            – anisoptera
            Mar 11 at 19:55
















          Ah, thanks for this find. Extremely unfortunate though. Guess I'm going to have to do the "deploy a separate ingress instance" solution mentioned in that issue...

          – anisoptera
          Mar 11 at 19:55





          Ah, thanks for this find. Extremely unfortunate though. Guess I'm going to have to do the "deploy a separate ingress instance" solution mentioned in that issue...

          – anisoptera
          Mar 11 at 19:55



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55054681%2fkubernetes-nginx-ingress-0-22-not-respecting-cookie-affinity-annotation%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

          Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

          2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived