Closed alexandreMegel closed 11 months ago
Hi @alexandreMegel
Glad to see you here! I am not team member of Teleport, but I faced the same issue.
I installed teleport cluster as a helm chart. I used DO installation instruction, because I did not want to create the amazon s3 and other amazon related stuff. But I forget to set the proper annotations on teleport service. So I had many times the same issue as you. Finally, I realised that I need to set the proper annotations. And here is the snippet:
proxy:
highAvailability:
replicaCount: 1
annotations:
serviceAccount:
eks.amazonaws.com/role-arn: arn:aws:iam::308712144460:role/teleport-discovery
annotations:
service:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: '60'
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true'
service.beta.kubernetes.io/aws-load-balancer-type: nlb
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
works like a charm for me! Also it is worth mentioning that teleport is deployed on top of EKS cluster with aws-load-balancer-controller installed. I hope this information will help you.
Hi @gecube , thank you for you answer.
I am currently not using a NLB but a Layer 7 ALB, all my k8s services are ClusterIP type.
However, I have already setup my ingress with the right ALB annotations (I think):
metadata:
annotations:
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:eu-west-3:778273502744:certificate/ed853ecb-90cf-*******
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/ssl-redirect: "443"
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig":
{ "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
alb.ingress.kubernetes.io/backend-protocol: HTTPS
alb.ingress.kubernetes.io/healthcheck-protocol: HTTPS
alb.ingress.kubernetes.io/success-codes: 200-310
alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=3600
it's not recommended setup. Please refer to https://github.com/gravitational/teleport/blob/3b8aba9779b82addd19afde960cc3e1782a5b670/examples/chart/teleport-cluster/templates/proxy/service.yaml#L23 So NLB is recommended by teleport developers. No idea what's wrong with your ALB, sorry.
This was recently fixed and will be available in 14.2.1 in the next couple of days.
Fixed by #34843
Hello,
I am facing an issue where Teleport seems to kill TCP connections after ~30 seconds. I have deployed Teleport in an AWS EKS cluster and I have an web application running in another AWS EKS cluster. Teleport cluster is behind an AWS ALB with idle timeout of 3600 seconds.
Expected behavior:
Teleport should forwards long running queries to the Teleport cluster proxy. I am using websockets
Current behavior:
I am facing HTTP 502 error when using my web application with Teleport and everything's good when i am not using Teleport
Teleport seems to kill Teleport TCP connections between the Teleport agent and Teleport proxy or between Teleport Proxy and my ALB
Teleport version:
logs:
Teleport agent:
Everything seems ok from the Teleport agent
AWS ALB:
app/k8s-teleport-ingresst-b0a2042339/06d18c67f3eb0542 ************* 10.235.1.146:3080 0.000 44.513 -1 502 - 2270 595 "POST https://********************:443/*********/table_conservation HTTP/2.0" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 arn:aws:elasticloadbalancing:eu-west-3:778273502744:targetgroup/k8s-teleport-teleport-db898572d7/655ecf6aa420b99a "Root=1-655621fb-62759b0e4c8ce8cd4325056c" "teleport-*******************.com" "arn:aws:acm:eu-west-3:778273502744:certificate/ed853ecb-90cf-*******************" 2 2023-11-16T14:06:51.148000Z "forward" "-" "-" "10.235.1.146:3080" "-" "-" "-"
We can see that the ALB didn't get any responses from Teleport cluster and then return a HTTP 502 error
Teleport configuration:
Teleport proxy configuration:
Teleport auth configuration:
Teleport agent configuration deployed in the AWS EKS cluster where the web application is running:
Thank you for your help.