Creating an Application Load Balancer in AWS with "kubernetes_service"

560 views
Skip to first unread message

Lucas Possamai

unread,
Mar 14, 2021, 7:43:24 PM3/14/21
to terrafo...@googlegroups.com
Hi all,

Why when I create the below resource, it creates a Classic Load Balancer, and not an ALB?

Thanks in advance!

resource "kubernetes_service" "nginx" {
metadata {
name = "nginx-example"
annotations = {
}
}
spec {
selector = {
App = kubernetes_deployment.nginx.spec.0.template.0.metadata[0].labels.App
}
port {
port = 80
target_port = 80
}

type = "LoadBalancer"
}
}

O K

unread,
Jul 21, 2021, 5:13:31 PM7/21/21
to Terraform
Try to create it manually with kubectl and parameter --server-side --field-manager=Terraform
Reply all
Reply to author
Forward
0 new messages