Traefik for Kubernetes in Azure (redirect to https for the frontend)unable to access kubernetes dashboard via tokenHow to enable traffic routing for frontend+backend servers in kubernetes cluster (traefik+k8s ingress controller)Traefik as Ingress controller: 404 when using Letsencrypt for httpsTraefik HTTP - HTTPS redirecting behind AWS ELB (TCP)How to enable Client Certificate Authentication with Traefik & Kubernetes?Is it possible to access the Kubernetes API via https ingress?Traefik on kubernetes with external loadbalancerForce HTTPS with TraefikTomcat Application Server in Docker Swarm with Traefik HTTPS Redirect returns Gateway TimeoutTraefik - force return 404 for non existing subdomains

If I stood next to a piece of metal heated to a million degrees, but in a perfect vacuum, would I feel hot?

What's the meaning of こそ in this sentence?

Why hasn't the U.S. government paid war reparations to any country it attacked?

In special relativity is mass just a measure of all other energy than kinetic?

What are the arguments for California’s nonpartisan blanket (jungle) primaries?

Will it hurt my career to work as a graphic designer in a startup for beauty and skin care?

MQTT subscription topic match

What made Windows ME so crash-prone?

Using two linked programs, output ordinal numbers up to n

Mathematica function equivalent to Matlab's residue function (partial fraction expansion)

pgfkeys: .store in constructed macro

Why doesn't philosophy have higher standards for its arguments?

What are "full piece" and "half piece" in chess?

What is the superlative of ipse?

How are packets handled and prioritized over a link with multiple VLANS?

In Adventurers League, is there any way for an 5th-level wizard to gain heavy armor proficiency?

Credit card stolen every 1-2 years. What am I doing wrong?

What systems of robust steganography are out there?

Do aircraft cabins have suspension?

Clarification on defining FFT bin sizes

A Difficult Double Sum.

Can you perfectly wrap a cube with this blocky shape?

Sending a photo of my bank account card to the future employer

Animal Shelter Management C++



Traefik for Kubernetes in Azure (redirect to https for the frontend)


unable to access kubernetes dashboard via tokenHow to enable traffic routing for frontend+backend servers in kubernetes cluster (traefik+k8s ingress controller)Traefik as Ingress controller: 404 when using Letsencrypt for httpsTraefik HTTP - HTTPS redirecting behind AWS ELB (TCP)How to enable Client Certificate Authentication with Traefik & Kubernetes?Is it possible to access the Kubernetes API via https ingress?Traefik on kubernetes with external loadbalancerForce HTTPS with TraefikTomcat Application Server in Docker Swarm with Traefik HTTPS Redirect returns Gateway TimeoutTraefik - force return 404 for non existing subdomains






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm trying to redirect an ingress for the service deployed in Azure Kubernetes to https. Whatever I try doesn't work. I tried configuring Ingress and Traefik itself (via ConfigMap) with no effect.



The config for Traefik looks as the following:



---
# Traefik_config.yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: traefik-conf
namespace: kube-system
# traefik.toml
data:
traefik.toml: |
defaultEntryPoints = ["http","https"]

[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]

[frontends]
[frontends.frontend2]
backend = "backend1"
passHostHeader = true
# overrides default entry points
entrypoints = ["http", "https"]

[backends]
[backends.backend1]
[backends.backend1.servers.server1]
url = "http://auth.mywebsite.com"


The subject for redirection is containerized IdentityServer API website with no TLS encryption. There are a couple of questions on the matter:



  • What's the best way to redirect the frontend app in Azure Kubernetes with Traefik

  • In the config the frontend is numbered, i.e. "frontend2". I assume this a sequential number of the app on the Traefik's dashboard. The problem is, the dashboard only shows the total sum of apps. If there are many of them, how to figure what the number is?

  • When I apply annotations to the Ingress, like "traefik.ingress.kubernetes.io/redirect-permanent: true" the respective labels are not showing up in the Traefik's dashboard for the respective app. Is there any reason for that?









share|improve this question




























    1















    I'm trying to redirect an ingress for the service deployed in Azure Kubernetes to https. Whatever I try doesn't work. I tried configuring Ingress and Traefik itself (via ConfigMap) with no effect.



    The config for Traefik looks as the following:



    ---
    # Traefik_config.yaml
    ---
    apiVersion: v1
    kind: ConfigMap
    metadata:
    name: traefik-conf
    namespace: kube-system
    # traefik.toml
    data:
    traefik.toml: |
    defaultEntryPoints = ["http","https"]

    [entryPoints]
    [entryPoints.http]
    address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
    [entryPoints.https]
    address = ":443"
    [entryPoints.https.tls]

    [frontends]
    [frontends.frontend2]
    backend = "backend1"
    passHostHeader = true
    # overrides default entry points
    entrypoints = ["http", "https"]

    [backends]
    [backends.backend1]
    [backends.backend1.servers.server1]
    url = "http://auth.mywebsite.com"


    The subject for redirection is containerized IdentityServer API website with no TLS encryption. There are a couple of questions on the matter:



    • What's the best way to redirect the frontend app in Azure Kubernetes with Traefik

    • In the config the frontend is numbered, i.e. "frontend2". I assume this a sequential number of the app on the Traefik's dashboard. The problem is, the dashboard only shows the total sum of apps. If there are many of them, how to figure what the number is?

    • When I apply annotations to the Ingress, like "traefik.ingress.kubernetes.io/redirect-permanent: true" the respective labels are not showing up in the Traefik's dashboard for the respective app. Is there any reason for that?









    share|improve this question
























      1












      1








      1


      1






      I'm trying to redirect an ingress for the service deployed in Azure Kubernetes to https. Whatever I try doesn't work. I tried configuring Ingress and Traefik itself (via ConfigMap) with no effect.



      The config for Traefik looks as the following:



      ---
      # Traefik_config.yaml
      ---
      apiVersion: v1
      kind: ConfigMap
      metadata:
      name: traefik-conf
      namespace: kube-system
      # traefik.toml
      data:
      traefik.toml: |
      defaultEntryPoints = ["http","https"]

      [entryPoints]
      [entryPoints.http]
      address = ":80"
      [entryPoints.http.redirect]
      entryPoint = "https"
      [entryPoints.https]
      address = ":443"
      [entryPoints.https.tls]

      [frontends]
      [frontends.frontend2]
      backend = "backend1"
      passHostHeader = true
      # overrides default entry points
      entrypoints = ["http", "https"]

      [backends]
      [backends.backend1]
      [backends.backend1.servers.server1]
      url = "http://auth.mywebsite.com"


      The subject for redirection is containerized IdentityServer API website with no TLS encryption. There are a couple of questions on the matter:



      • What's the best way to redirect the frontend app in Azure Kubernetes with Traefik

      • In the config the frontend is numbered, i.e. "frontend2". I assume this a sequential number of the app on the Traefik's dashboard. The problem is, the dashboard only shows the total sum of apps. If there are many of them, how to figure what the number is?

      • When I apply annotations to the Ingress, like "traefik.ingress.kubernetes.io/redirect-permanent: true" the respective labels are not showing up in the Traefik's dashboard for the respective app. Is there any reason for that?









      share|improve this question














      I'm trying to redirect an ingress for the service deployed in Azure Kubernetes to https. Whatever I try doesn't work. I tried configuring Ingress and Traefik itself (via ConfigMap) with no effect.



      The config for Traefik looks as the following:



      ---
      # Traefik_config.yaml
      ---
      apiVersion: v1
      kind: ConfigMap
      metadata:
      name: traefik-conf
      namespace: kube-system
      # traefik.toml
      data:
      traefik.toml: |
      defaultEntryPoints = ["http","https"]

      [entryPoints]
      [entryPoints.http]
      address = ":80"
      [entryPoints.http.redirect]
      entryPoint = "https"
      [entryPoints.https]
      address = ":443"
      [entryPoints.https.tls]

      [frontends]
      [frontends.frontend2]
      backend = "backend1"
      passHostHeader = true
      # overrides default entry points
      entrypoints = ["http", "https"]

      [backends]
      [backends.backend1]
      [backends.backend1.servers.server1]
      url = "http://auth.mywebsite.com"


      The subject for redirection is containerized IdentityServer API website with no TLS encryption. There are a couple of questions on the matter:



      • What's the best way to redirect the frontend app in Azure Kubernetes with Traefik

      • In the config the frontend is numbered, i.e. "frontend2". I assume this a sequential number of the app on the Traefik's dashboard. The problem is, the dashboard only shows the total sum of apps. If there are many of them, how to figure what the number is?

      • When I apply annotations to the Ingress, like "traefik.ingress.kubernetes.io/redirect-permanent: true" the respective labels are not showing up in the Traefik's dashboard for the respective app. Is there any reason for that?






      azure kubernetes traefik






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 18 at 22:08









      AlexAlex

      365 bronze badges




      365 bronze badges






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Your configuration for redirecting http to https looks good. If you have followed the official Doc of Traefik to deploy on kubernetes, The Traefik ingress controller service will not have 443. Make sure you have port 443 opened on the Service with service type as LoadBalancer. Once we open a port in service, Then Azure opens the same port in the Azure load balancer. Service yaml is here.



          kind: Service
          apiVersion: v1
          metadata:
          name: traefik-ingress-service
          namespace: kube-system
          spec:
          selector:
          k8s-app: traefik-ingress-lb
          ports:
          - protocol: TCP
          port: 80
          name: web
          - protocol: TCP
          port: 8080
          name: admin
          type: LoadBalancer


          If you want to redirect all the http to https in your cluster, You can go for the redirection in the configuration file.
          If you want to redirect only some of the services, then add annotations in the Ingress to achieve redirection for specific services.



          traefik.ingress.kubernetes.io/frontend-entry-points: http,https
          traefik.ingress.kubernetes.io/redirect-entry-point: https


          After setting up the redirection, Traffic Dashboard reflects that here.
          You can also set up a permanent rediection using traefik.ingress.kubernetes.io/redirect-permanent: "true
          enter image description here






          share|improve this answer






















            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%2f55230779%2ftraefik-for-kubernetes-in-azure-redirect-to-https-for-the-frontend%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









            2














            Your configuration for redirecting http to https looks good. If you have followed the official Doc of Traefik to deploy on kubernetes, The Traefik ingress controller service will not have 443. Make sure you have port 443 opened on the Service with service type as LoadBalancer. Once we open a port in service, Then Azure opens the same port in the Azure load balancer. Service yaml is here.



            kind: Service
            apiVersion: v1
            metadata:
            name: traefik-ingress-service
            namespace: kube-system
            spec:
            selector:
            k8s-app: traefik-ingress-lb
            ports:
            - protocol: TCP
            port: 80
            name: web
            - protocol: TCP
            port: 8080
            name: admin
            type: LoadBalancer


            If you want to redirect all the http to https in your cluster, You can go for the redirection in the configuration file.
            If you want to redirect only some of the services, then add annotations in the Ingress to achieve redirection for specific services.



            traefik.ingress.kubernetes.io/frontend-entry-points: http,https
            traefik.ingress.kubernetes.io/redirect-entry-point: https


            After setting up the redirection, Traffic Dashboard reflects that here.
            You can also set up a permanent rediection using traefik.ingress.kubernetes.io/redirect-permanent: "true
            enter image description here






            share|improve this answer



























              2














              Your configuration for redirecting http to https looks good. If you have followed the official Doc of Traefik to deploy on kubernetes, The Traefik ingress controller service will not have 443. Make sure you have port 443 opened on the Service with service type as LoadBalancer. Once we open a port in service, Then Azure opens the same port in the Azure load balancer. Service yaml is here.



              kind: Service
              apiVersion: v1
              metadata:
              name: traefik-ingress-service
              namespace: kube-system
              spec:
              selector:
              k8s-app: traefik-ingress-lb
              ports:
              - protocol: TCP
              port: 80
              name: web
              - protocol: TCP
              port: 8080
              name: admin
              type: LoadBalancer


              If you want to redirect all the http to https in your cluster, You can go for the redirection in the configuration file.
              If you want to redirect only some of the services, then add annotations in the Ingress to achieve redirection for specific services.



              traefik.ingress.kubernetes.io/frontend-entry-points: http,https
              traefik.ingress.kubernetes.io/redirect-entry-point: https


              After setting up the redirection, Traffic Dashboard reflects that here.
              You can also set up a permanent rediection using traefik.ingress.kubernetes.io/redirect-permanent: "true
              enter image description here






              share|improve this answer

























                2












                2








                2







                Your configuration for redirecting http to https looks good. If you have followed the official Doc of Traefik to deploy on kubernetes, The Traefik ingress controller service will not have 443. Make sure you have port 443 opened on the Service with service type as LoadBalancer. Once we open a port in service, Then Azure opens the same port in the Azure load balancer. Service yaml is here.



                kind: Service
                apiVersion: v1
                metadata:
                name: traefik-ingress-service
                namespace: kube-system
                spec:
                selector:
                k8s-app: traefik-ingress-lb
                ports:
                - protocol: TCP
                port: 80
                name: web
                - protocol: TCP
                port: 8080
                name: admin
                type: LoadBalancer


                If you want to redirect all the http to https in your cluster, You can go for the redirection in the configuration file.
                If you want to redirect only some of the services, then add annotations in the Ingress to achieve redirection for specific services.



                traefik.ingress.kubernetes.io/frontend-entry-points: http,https
                traefik.ingress.kubernetes.io/redirect-entry-point: https


                After setting up the redirection, Traffic Dashboard reflects that here.
                You can also set up a permanent rediection using traefik.ingress.kubernetes.io/redirect-permanent: "true
                enter image description here






                share|improve this answer













                Your configuration for redirecting http to https looks good. If you have followed the official Doc of Traefik to deploy on kubernetes, The Traefik ingress controller service will not have 443. Make sure you have port 443 opened on the Service with service type as LoadBalancer. Once we open a port in service, Then Azure opens the same port in the Azure load balancer. Service yaml is here.



                kind: Service
                apiVersion: v1
                metadata:
                name: traefik-ingress-service
                namespace: kube-system
                spec:
                selector:
                k8s-app: traefik-ingress-lb
                ports:
                - protocol: TCP
                port: 80
                name: web
                - protocol: TCP
                port: 8080
                name: admin
                type: LoadBalancer


                If you want to redirect all the http to https in your cluster, You can go for the redirection in the configuration file.
                If you want to redirect only some of the services, then add annotations in the Ingress to achieve redirection for specific services.



                traefik.ingress.kubernetes.io/frontend-entry-points: http,https
                traefik.ingress.kubernetes.io/redirect-entry-point: https


                After setting up the redirection, Traffic Dashboard reflects that here.
                You can also set up a permanent rediection using traefik.ingress.kubernetes.io/redirect-permanent: "true
                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 26 at 7:27









                jakaruna-msftjakaruna-msft

                412 bronze badges




                412 bronze badges


















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    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%2f55230779%2ftraefik-for-kubernetes-in-azure-redirect-to-https-for-the-frontend%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

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현