vardius / go-api-boilerplate

Go Server/API boilerplate using best practices DDD CQRS ES gRPC
https://go-api-boilerplate.local
MIT License
929 stars 135 forks source link

terraform apply #89

Open talpa opened 3 years ago

talpa commented 3 years ago

I tried make terraform-install and result is

cd k8s \
  kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.crds.yaml \
terraform init \
terraform apply \
  terraform output -raw templates | kubectl apply -f -
error: no objects passed to apply
make: *** [Makefile:66: terraform-install] Error 1

when I try command by comand then by kubectl apply is result this...


Error: Post "http://localhost/api/v1/namespaces": dial tcp 127.0.0.1:80: connect: connection refused
│ 
│   with kubernetes_namespace.main,
│   on k8s-namespace.tf line 1, in resource "kubernetes_namespace" "main":
│    1: resource "kubernetes_namespace" "main" {
│ 
╵
╷
│ Error: Post "http://localhost/apis/storage.k8s.io/v1/storageclasses": dial tcp 127.0.0.1:80: connect: connection refused
│ 
│   with kubernetes_storage_class.mongodb,
│   on mongodb.tf line 28, in resource "kubernetes_storage_class" "mongodb":
│   28: resource "kubernetes_storage_class" "mongodb" {

Can you help me? Please

vardius commented 3 years ago

it tries to create a volume, make sure that mounted directory exists on the machine

sorry, for the late reply but I just noticed, for some reason I didn't get email about that issue

gopherstein commented 2 years ago

For anyone having this issue. Just set the kube context in the terraform variable file to the context you want to use.