Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.4K Intelligent Advisor
- 75 Insurance
- 537.7K On-Premises Infrastructure
- 138.7K Analytics Software
- 38.6K Application Development Software
- 6.1K Cloud Platform
- 109.6K Database Software
- 17.6K Enterprise Manager
- 8.8K Hardware
- 71.3K Infrastructure Software
- 105.4K Integration
- 41.6K Security Software
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 ?