K8s e DEIS Workflow (problema a atender pedidos vindos atraves de um endereco externo *CNAME records)

16 views
Skip to first unread message

Claudio Teixeira

unread,
Dec 21, 2017, 9:23:24 PM12/21/17
to devops
Contexto:
Temos uma stack de infrastructura baseada em k8s, deployed na AWS.
Para DNS management usamos Route53.
Sobre o K8s e como abstracao temos uma framework DEIS Workflow (que interage directamente com o kubectl) e permite gerir deployments e networking.
* A stack foi orchestrada via Terraform (projecto opinionado).

Problema:
Tenho novos clientes (whitelabel) que precisam utilizar os nossos URLs.
Eles criaram um record simples CNAME apontando directamente para um dos nossos URLs (temos muitos clientes assim).

Adicionei os clientes no DEIS (interface para os services do k8s e adicionei entradas no route53 para os pedidos desse URL serem direccionados para os ELBs, especie de copy paste dos que ja la estavam).

Acontece que quando fazemos curl nesses URLs do cliente, os pedidos sao atendidos pelo router do DEIS (a correr sobre a stack K8s) e o DEIS Router retorna a pagina 404 default do nginx.

Estava a tentar perceber o porque disso estar a acontecer e como resolver.
Ja andei dentro das maquinas (via SSH) e consegui descobrir que o pedido estava a ser atendido pelo router do DEIS atraves de um tail nos access logs do nginx.

Se alguem tiver alguma dica agradecia.

Muito Obrigado.

Abraco,
Claudio

Nathaniel Eliot

unread,
Dec 21, 2017, 9:43:16 PM12/21/17
to dev...@googlegroups.com
Claudio:

I don't speak Portuguese, so apologies if I am misunderstanding, and I hope the English response will serve. However, it sounds like you need to make Deis aware of the CNAME domain, as it doesn't know how to handle that URL currently.

http://docs.deis.io/en/latest/using_deis/config-application/#custom-domains should be the command you need.

Boa sorte!

Cheers,

--
Nathaniel Eliot
T9 Productions

--

---
You received this message because you are subscribed to the Google Groups "devops" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devops+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Claudio Teixeira

unread,
Dec 22, 2017, 3:45:28 AM12/22/17
to devops
Many thanks for your response Nathaniel Eliot, and apologies for posting in Portuguese.
I've added the domains to the DEIS workflow (namely on the application which I wanted it to be added).
The problem persists (adding or not adding it on DEIS, the request is always handled by the fallback DEIS Router.
In my route53 calls to that URL are being routed to an ELB which is pointing to the K8s (with DEIS).
This issue is only happening for new domains. We have a total of 10 domains already set.

Is there any way that the AWS ELB could be causing this?

Thanks in advance.
Best regards,
Claudio
To unsubscribe from this group and stop receiving emails from it, send an email to devops+un...@googlegroups.com.

Nathaniel Eliot

unread,
Dec 22, 2017, 11:16:26 AM12/22/17
to dev...@googlegroups.com
ELB only routes traffic; it should have no effect on DNS or server response. 

I'm not familiar with Deis, but when I've had these problems with similar setups (Flynn), the culprit was often a fat-finger on my part. Double-check the route is spelled correctly in your app.

Unfortunately, we are probably not going to be much help in debugging, as this isn't a Deis specific list. I would suggest their IRC channel, or another free support channel, from https://deis.com/support-policy/

Cheers,


Nathaniel Eliot

To unsubscribe from this group and stop receiving emails from it, send an email to devops+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages