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

          Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

          Posting a File and Associated Data to a RESTful WebService preferably as JSON2019 Community Moderator ElectionREST URI convention - Singular or plural name of resource while creating itUploading both data and files in one form using Ajax?How do I upload a file with metadata using a REST web service?REST API - file (ie images) processing - best practicesSpring: JSON data and file in the same requestREST API Put large dataPosting a file and JSON data to Spring rest serviceRESTful Web Service Upload/Download Large Data With JSONREST API Design sending JSON data and a file to the api in same requestPost JSONArray to REST servicePUT vs. POST in RESTParsing values from a JSON file?JavaScript/jQuery to download file via POST with JSON dataHow do I upload a file with metadata using a REST web service?How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?Separate REST JSON API server and client?what's the correct way to send a file from REST web service to client?How do I write JSON data to a file?What is “406-Not Acceptable Response” in HTTP?REST API - file (ie images) processing - best practices

          How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page