This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,720 Users
  • 2,269,776 Discussions
  • 7,916,827 Comments

Discussions

OCI terraform provider not working

I have created K8 cluster using OCI terraform providers ( datablazeOKI ) . it was created successfully but when I am creating a pod and installing a tomcat image in it. It giving this error: │ Error: Post "http://localhost/api/v1/namespaces/default/services": dial tcp [::1]:80: connectex: No connection could be made because the target machine actively refused it


However if create it using YAML file it works.

my prvider.tf is as :

provider "oci" {

cluster_id = "ocid1.cluster.oc1.."

tenancy_ocid = "ocid1.tenancy.oc1..aa.."

user_ocid = "ocid1.user.oc1..aa.."

private_key_path = "....\\databl-09-19-16-50.pem"

fingerprint = "xyyyyz..8"

region = "us-ashburn-1"

}


and deployment terraform script:

resource "kubernetes_service" "datablazefront" {

metadata {

name = "datablazefront"

}

spec {

selector = {

app = "datablaze"

}

session_affinity = "ClientIP"

port {

port = 8080

target_port = 80

}


type = "LoadBalancer"

}

}


resource "kubernetes_pod" "tomcatpod" {

metadata {

name = "tomcatpod"

labels = {

app = "datablaze"

}

}


spec {

container {

image = "us-ashburn-1.ocir.io/idoevyl860om/repo1/tomcat-image:test01"

name = "datablazefront"

}

}

}


pls suggest ASAP what is missing ?