Skip to content

Instantly share code, notes, and snippets.

@iampato
Created May 7, 2024 10:39
Show Gist options
  • Save iampato/c68f822d5cdba85b6c0e8eba21720acd to your computer and use it in GitHub Desktop.
Save iampato/c68f822d5cdba85b6c0e8eba21720acd to your computer and use it in GitHub Desktop.
traefik ebs

Here are two approaches to achieve your goal:

  1. LoadBalancer Service with Traefik:

Create a LoadBalancer Service: Define a LoadBalancer service in your Kubernetes manifest for your Traefik deployment. This service automatically provisions an AWS Elastic Load Balancer (ELB). Configure Traefik Ingress: Create an Ingress resource that points to your Traefik service. This tells Traefik to route incoming traffic based on the defined rules. External Access: The ELB gets a public DNS name. You can use this DNS name to access your application externally. 2. NodePort Service with Traefik (Limited Use Case):

Note: This approach is generally not recommended for production due to security concerns and managing individual node IPs.

Create a NodePort Service: Define a NodePort service for your Traefik deployment. This exposes Traefik on a random port on each node in the managed node group. Configure Traefik Ingress: Similar to the LoadBalancer approach, configure an Ingress resource pointing to your Traefik service. External Access: To access your application externally, you'd need to know the IP address of a specific node in the managed node group and use the NodePort assigned to Traefik on that node (format: <node_ip>:).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment