Hi@MD,
You can use kubernetes_service resource to expose the Pod. You need to specify the target port as shown below.
resource "kubernetes_service" "example" {
metadata {
name = "example-test"
}
spec {
selector {
App = "${kubernetes_pod.example.metadata.0.labels.App}"
}
port {
port = 80
target_port = 80
}
type = "LoadBalancer"
}
}