You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In a docker container when initializing the k8s provider with values from a GKE instance generated by terraform, the provider will attempt to connect to a kubernetes cluster at localhost.
Running terraform plan succeeds normally (at least on macOS)
Running docker build . fails
The error given is:
Error: Failed to configure: Get http://localhost/api?timeout=32s: dial tcp 127.0.0.1:80: connect: connection refused
on main.tf line 45, in provider "k8s":
45: provider "k8s" {
Expected behavior docker build . should succeed and not try to connect to a cluster before the host/token/certificate are known. At the very least, the behavior should be consistent across all platforms. I also tried changing from an Alpine based image to Debian Stretch, but the docker-based approach still failed.
The text was updated successfully, but these errors were encountered:
Describe the bug
In a docker container when initializing the k8s provider with values from a GKE instance generated by terraform, the provider will attempt to connect to a kubernetes cluster at localhost.
Steps to reproduce the issue:
See https://github.com/nbhargava/terraform-k8s-alpine. After plugging in a real GCP project name in
main.tf
and storing credentials in./creds
:terraform plan
succeeds normally (at least on macOS)docker build .
failsThe error given is:
Expected behavior
docker build .
should succeed and not try to connect to a cluster before the host/token/certificate are known. At the very least, the behavior should be consistent across all platforms. I also tried changing from an Alpine based image to Debian Stretch, but the docker-based approach still failed.The text was updated successfully, but these errors were encountered: