Why do I need kubernetes Ingress for custom domain?












0















I deployed my app using kubernetes and now Id like to add custom domain to the app. I am using this tutorial and it uses ingress to set the custom domain.

I noticed that the app load balancer has an ip. Why shouldn't I use that ip? What is the reason I need ingress?










share|improve this question



























    0















    I deployed my app using kubernetes and now Id like to add custom domain to the app. I am using this tutorial and it uses ingress to set the custom domain.

    I noticed that the app load balancer has an ip. Why shouldn't I use that ip? What is the reason I need ingress?










    share|improve this question

























      0












      0








      0








      I deployed my app using kubernetes and now Id like to add custom domain to the app. I am using this tutorial and it uses ingress to set the custom domain.

      I noticed that the app load balancer has an ip. Why shouldn't I use that ip? What is the reason I need ingress?










      share|improve this question














      I deployed my app using kubernetes and now Id like to add custom domain to the app. I am using this tutorial and it uses ingress to set the custom domain.

      I noticed that the app load balancer has an ip. Why shouldn't I use that ip? What is the reason I need ingress?







      kubernetes kubernetes-ingress nginx-ingress






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 '18 at 9:17









      NaorNaor

      9,89634117224




      9,89634117224
























          2 Answers
          2






          active

          oldest

          votes


















          1














          If you want to expose your app, you could just as easily use a service of type NodePort instead of an Ingress. You could also use the type LoadBalancer. LoadBalancer is a superset of NodePort and assigns a fixed ip. With the type LoadBalancer you could assign a domain to this fixed IP. How to do this depends on where you have registered your domain.



          To answer your questions:




          • You do not need an Ingress you could use a NodePort service or
            LoadBalander service.

          • To assign a domain to your app, you do not
            need an Ingress, you could use a LoadBalancer service

          • In any case,
            you could just use the ip, but as already pointed out, a domain is
            more convenient.


          If you just want to try out your app, you could just use the IP. A domain can be assigned later.



          Here is a official kubernetes tutorial on how to expose an app: https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/






          share|improve this answer


























          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15











          • Which DNS do you mean?

            – mbuechmann
            Nov 22 '18 at 15:31











          • I have the IP of the load balancer, so I can config the DNS of the domain to transform to that IP (or is it A record? I am not familiar with DNS)

            – Naor
            Nov 22 '18 at 15:39











          • Yes, of course you can do that. You need to set the A-Record to the IP.

            – mbuechmann
            Nov 22 '18 at 15:48













          • So why do I need to use Ingress? Why it is better then A-Record for that ip?

            – Naor
            Nov 22 '18 at 16:33



















          0














          Using domains over IPs has it's obvious advantages of not having to memorize 158.21.72.879 instead of mydomain.com.



          Next, using mydomain.com, you can change your IP as many times as you like without having to change your calls to mydomain.com.



          Ingress comes in different flavors, is highly configurable, allows for traffic redirection using kubernetes service names and some of them even have their own stats page so you can monitor your requests.



          Furthermore, if you are using gcloud or the like, the LoadBalancer IP could change (unless confiugred otherwise), assigning you any available IP from your IP pool.



          The real question is - why NOT use an Ingress?






          share|improve this answer
























          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15











          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%2f53427457%2fwhy-do-i-need-kubernetes-ingress-for-custom-domain%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          If you want to expose your app, you could just as easily use a service of type NodePort instead of an Ingress. You could also use the type LoadBalancer. LoadBalancer is a superset of NodePort and assigns a fixed ip. With the type LoadBalancer you could assign a domain to this fixed IP. How to do this depends on where you have registered your domain.



          To answer your questions:




          • You do not need an Ingress you could use a NodePort service or
            LoadBalander service.

          • To assign a domain to your app, you do not
            need an Ingress, you could use a LoadBalancer service

          • In any case,
            you could just use the ip, but as already pointed out, a domain is
            more convenient.


          If you just want to try out your app, you could just use the IP. A domain can be assigned later.



          Here is a official kubernetes tutorial on how to expose an app: https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/






          share|improve this answer


























          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15











          • Which DNS do you mean?

            – mbuechmann
            Nov 22 '18 at 15:31











          • I have the IP of the load balancer, so I can config the DNS of the domain to transform to that IP (or is it A record? I am not familiar with DNS)

            – Naor
            Nov 22 '18 at 15:39











          • Yes, of course you can do that. You need to set the A-Record to the IP.

            – mbuechmann
            Nov 22 '18 at 15:48













          • So why do I need to use Ingress? Why it is better then A-Record for that ip?

            – Naor
            Nov 22 '18 at 16:33
















          1














          If you want to expose your app, you could just as easily use a service of type NodePort instead of an Ingress. You could also use the type LoadBalancer. LoadBalancer is a superset of NodePort and assigns a fixed ip. With the type LoadBalancer you could assign a domain to this fixed IP. How to do this depends on where you have registered your domain.



          To answer your questions:




          • You do not need an Ingress you could use a NodePort service or
            LoadBalander service.

          • To assign a domain to your app, you do not
            need an Ingress, you could use a LoadBalancer service

          • In any case,
            you could just use the ip, but as already pointed out, a domain is
            more convenient.


          If you just want to try out your app, you could just use the IP. A domain can be assigned later.



          Here is a official kubernetes tutorial on how to expose an app: https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/






          share|improve this answer


























          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15











          • Which DNS do you mean?

            – mbuechmann
            Nov 22 '18 at 15:31











          • I have the IP of the load balancer, so I can config the DNS of the domain to transform to that IP (or is it A record? I am not familiar with DNS)

            – Naor
            Nov 22 '18 at 15:39











          • Yes, of course you can do that. You need to set the A-Record to the IP.

            – mbuechmann
            Nov 22 '18 at 15:48













          • So why do I need to use Ingress? Why it is better then A-Record for that ip?

            – Naor
            Nov 22 '18 at 16:33














          1












          1








          1







          If you want to expose your app, you could just as easily use a service of type NodePort instead of an Ingress. You could also use the type LoadBalancer. LoadBalancer is a superset of NodePort and assigns a fixed ip. With the type LoadBalancer you could assign a domain to this fixed IP. How to do this depends on where you have registered your domain.



          To answer your questions:




          • You do not need an Ingress you could use a NodePort service or
            LoadBalander service.

          • To assign a domain to your app, you do not
            need an Ingress, you could use a LoadBalancer service

          • In any case,
            you could just use the ip, but as already pointed out, a domain is
            more convenient.


          If you just want to try out your app, you could just use the IP. A domain can be assigned later.



          Here is a official kubernetes tutorial on how to expose an app: https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/






          share|improve this answer















          If you want to expose your app, you could just as easily use a service of type NodePort instead of an Ingress. You could also use the type LoadBalancer. LoadBalancer is a superset of NodePort and assigns a fixed ip. With the type LoadBalancer you could assign a domain to this fixed IP. How to do this depends on where you have registered your domain.



          To answer your questions:




          • You do not need an Ingress you could use a NodePort service or
            LoadBalander service.

          • To assign a domain to your app, you do not
            need an Ingress, you could use a LoadBalancer service

          • In any case,
            you could just use the ip, but as already pointed out, a domain is
            more convenient.


          If you just want to try out your app, you could just use the IP. A domain can be assigned later.



          Here is a official kubernetes tutorial on how to expose an app: https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-intro/







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 3 '18 at 7:33

























          answered Nov 22 '18 at 10:08









          mbuechmannmbuechmann

          2,84621325




          2,84621325













          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15











          • Which DNS do you mean?

            – mbuechmann
            Nov 22 '18 at 15:31











          • I have the IP of the load balancer, so I can config the DNS of the domain to transform to that IP (or is it A record? I am not familiar with DNS)

            – Naor
            Nov 22 '18 at 15:39











          • Yes, of course you can do that. You need to set the A-Record to the IP.

            – mbuechmann
            Nov 22 '18 at 15:48













          • So why do I need to use Ingress? Why it is better then A-Record for that ip?

            – Naor
            Nov 22 '18 at 16:33



















          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15











          • Which DNS do you mean?

            – mbuechmann
            Nov 22 '18 at 15:31











          • I have the IP of the load balancer, so I can config the DNS of the domain to transform to that IP (or is it A record? I am not familiar with DNS)

            – Naor
            Nov 22 '18 at 15:39











          • Yes, of course you can do that. You need to set the A-Record to the IP.

            – mbuechmann
            Nov 22 '18 at 15:48













          • So why do I need to use Ingress? Why it is better then A-Record for that ip?

            – Naor
            Nov 22 '18 at 16:33

















          Why not cname the load balancer ip in the DNS?

          – Naor
          Nov 22 '18 at 15:15





          Why not cname the load balancer ip in the DNS?

          – Naor
          Nov 22 '18 at 15:15













          Which DNS do you mean?

          – mbuechmann
          Nov 22 '18 at 15:31





          Which DNS do you mean?

          – mbuechmann
          Nov 22 '18 at 15:31













          I have the IP of the load balancer, so I can config the DNS of the domain to transform to that IP (or is it A record? I am not familiar with DNS)

          – Naor
          Nov 22 '18 at 15:39





          I have the IP of the load balancer, so I can config the DNS of the domain to transform to that IP (or is it A record? I am not familiar with DNS)

          – Naor
          Nov 22 '18 at 15:39













          Yes, of course you can do that. You need to set the A-Record to the IP.

          – mbuechmann
          Nov 22 '18 at 15:48







          Yes, of course you can do that. You need to set the A-Record to the IP.

          – mbuechmann
          Nov 22 '18 at 15:48















          So why do I need to use Ingress? Why it is better then A-Record for that ip?

          – Naor
          Nov 22 '18 at 16:33





          So why do I need to use Ingress? Why it is better then A-Record for that ip?

          – Naor
          Nov 22 '18 at 16:33













          0














          Using domains over IPs has it's obvious advantages of not having to memorize 158.21.72.879 instead of mydomain.com.



          Next, using mydomain.com, you can change your IP as many times as you like without having to change your calls to mydomain.com.



          Ingress comes in different flavors, is highly configurable, allows for traffic redirection using kubernetes service names and some of them even have their own stats page so you can monitor your requests.



          Furthermore, if you are using gcloud or the like, the LoadBalancer IP could change (unless confiugred otherwise), assigning you any available IP from your IP pool.



          The real question is - why NOT use an Ingress?






          share|improve this answer
























          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15
















          0














          Using domains over IPs has it's obvious advantages of not having to memorize 158.21.72.879 instead of mydomain.com.



          Next, using mydomain.com, you can change your IP as many times as you like without having to change your calls to mydomain.com.



          Ingress comes in different flavors, is highly configurable, allows for traffic redirection using kubernetes service names and some of them even have their own stats page so you can monitor your requests.



          Furthermore, if you are using gcloud or the like, the LoadBalancer IP could change (unless confiugred otherwise), assigning you any available IP from your IP pool.



          The real question is - why NOT use an Ingress?






          share|improve this answer
























          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15














          0












          0








          0







          Using domains over IPs has it's obvious advantages of not having to memorize 158.21.72.879 instead of mydomain.com.



          Next, using mydomain.com, you can change your IP as many times as you like without having to change your calls to mydomain.com.



          Ingress comes in different flavors, is highly configurable, allows for traffic redirection using kubernetes service names and some of them even have their own stats page so you can monitor your requests.



          Furthermore, if you are using gcloud or the like, the LoadBalancer IP could change (unless confiugred otherwise), assigning you any available IP from your IP pool.



          The real question is - why NOT use an Ingress?






          share|improve this answer













          Using domains over IPs has it's obvious advantages of not having to memorize 158.21.72.879 instead of mydomain.com.



          Next, using mydomain.com, you can change your IP as many times as you like without having to change your calls to mydomain.com.



          Ingress comes in different flavors, is highly configurable, allows for traffic redirection using kubernetes service names and some of them even have their own stats page so you can monitor your requests.



          Furthermore, if you are using gcloud or the like, the LoadBalancer IP could change (unless confiugred otherwise), assigning you any available IP from your IP pool.



          The real question is - why NOT use an Ingress?







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 '18 at 9:54









          Urosh T.Urosh T.

          66711116




          66711116













          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15



















          • Why not cname the load balancer ip in the DNS?

            – Naor
            Nov 22 '18 at 15:15

















          Why not cname the load balancer ip in the DNS?

          – Naor
          Nov 22 '18 at 15:15





          Why not cname the load balancer ip in the DNS?

          – Naor
          Nov 22 '18 at 15:15


















          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%2f53427457%2fwhy-do-i-need-kubernetes-ingress-for-custom-domain%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

          Costa Masnaga

          Fotorealismo

          Sidney Franklin