aws-target-group-binding
by Skyloud SAS
Chart to link an AWS ALB Target Group to a Kubernetes Service
About this chart
AWS Target Group Binding
This chart create a TargetGroupBinding custom resource definition (CRD) that allows to bind an AWS target group to a Kubernetes namespace.
To have more information about the TargetGroupBinding CRD, please refer to the official documentation
How to use
resource "helm_release" "aws_target_group_binding" {
name = "aws-target-group-binding"
namespace = "your-namespace"
repository = "https://skyloud.github.io/helm-charts"
chart = "aws-target-group-binding"
version = "0.1.0"
values = [
yamlencode({
"namespace" = "default"
"service" = {
"name" = "my-service"
"port" = 80
}
"aws" = {
"targetGroupARN" = "arn:aws:elasticloadbalancing:eu-west-1:123456789012:targetgroup/my-target-group/1234567890abcdef0"
"targetType" = "ip"
}
})
]
}
Notes on the targetType
The targetType field can be either ip or instance. The default value is ip. ip is the recommended value for most use cases. If you need to use instance, please refer to the official documentation for more information.
ip target the traffic to the Kubernetes Endpoints registered for the Service in Kubernetes. It can be used with any type of Service.
instance target the traffic to the Kubernetes Nodes where the Pods are running. It can only be used with a Service of type NodePort.
Deploy aws-target-group-binding with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has aws-target-group-binding on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartaws-target-group-binding is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply