Open Manoj-07 opened 2 years ago
Could you post those .yaml
and .tf
files?
Tip: copypasting text instead of images makes everything better.
https://github.com/Kurento/Kubernetes/blob/master/nginx-deployment-service.yaml nginx-deployment-service.yaml anfd the terraform converted file is
resource "kubernetes_deployment" "nginx" {
metadata {
name = "nginx"
}
spec {
replicas = 3
selector {
match_labels = {
app = "nginx"
}
}
template {
metadata {
labels = {
app = "nginx"
}
}
spec {
container {
name = "nginx"
image = "nginx"
port {
container_port = 80
}
}
}
}
strategy {
type = "Recreate"
}
}
}
resource "kubernetes_service" "nginx" {
metadata {
name = "nginx"
namespace = "default"
labels = {
app = "nginx"
}
annotations = {
"service.beta.kubernetes.io/aws-load-balancer-type" = "nlb"
}
}
spec {
port {
name = "http"
protocol = "TCP"
port = 80
target_port = "80"
}
selector = {
app = "nginx"
}
type = "LoadBalancer"
external_traffic_policy = "Local"
}
}
I had successfully converted YAML to.tf while I am trying to deploy it I am getting the following error could you please help me to resolve the eeror