kyma-incubator / terraform-provider-kind

Terraform Provider for kind (Kubernetes IN Docker)
Apache License 2.0
80 stars 44 forks source link

Changed behavior between releases - kubeconfig server returns DNS name instead of IP #20

Closed pst closed 4 years ago

pst commented 4 years ago

In the previous release the kubeconfig's server attribute was set to server: https://172.17.0.4:6443 but the new release sets server: https://kind-ops-localhost-control-plane:6443.

I'm using this kind provider in combination with my kustomize provider for the local development environment of the Kubestack GitOps framework. Unfortunately, after upgrading to the latest release of the kind provider this fails with:

Get "https://kind-ops-localhost-control-plane:6443/api?timeout=32s": dial tcp: lookup kind-ops-localhost-control-plane on 192.168.10.1:53: no such host

I can see that provider.KubeConfig always set true for the second parameter, which sounded like it would be related. But a quick hack setting this to false did not seem to restore the previous behavior. I checked upstream in the kind code base but could not find anything that suggests there was a change either. There are mentions of DNS now just working in the release notes. But it's not clear to me if this is related.

Any ideas what could have caused this or more importantly how to fix it? For what it's worth, the kubeconfig file created on the filesystem, does specify an IP and works.

pst commented 4 years ago

Please see this comment for more details: https://github.com/kubernetes-sigs/kind/issues/1835#issuecomment-688563971

tehcyx commented 4 years ago

Hey @pst,

thanks for investigating this further. I see on your connected commits, that you changed it to false but reverted soon after. You weren't able to find an easy fix for this?

tehcyx commented 4 years ago

Saw the PR after commenting. Drafting a release right now, should be done any moment. Thank you!

pst commented 4 years ago

Yes, first try in the evening it seemed like it didn't help. But I must have done something wrong. Next morning after Ben's comment on the upstream issue I tried again and it worked.