-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform apply always fails with apiServer.certSANs: Invalid value: "" #57
Comments
Thanks for reporting this! Would you mind sharing the terraform snippet for
|
Its here. https://github.com/sadlil/system-samples/blob/main/periscope/infra/cluster/minikube.tf. Please Ignore the subnet and apiserver_ips field. I tried to override with various values to see if I can ignore the error. |
I think I've gotten to the root of the issue (both with the tf provider and the minikube CLI directly). This is primarily due to minikube being in an inconsistent state where there is an existing node (in this case a docker container) running, but minikube wasn't able to finish bootstrapping. The host machines state would look something like minikube profile: ❯ minikube profile list
|---------------------------------|-----------|---------|----|------|---------|---------|-------|--------|
| Profile | VM Driver | Runtime | IP | Port | Version | Status | Nodes | Active |
|---------------------------------|-----------|---------|----|------|---------|---------|-------|--------|
| minikube | docker | docker | | 8443 | v1.26.1 | Stopped | 1 | * |
|---------------------------------|-----------|---------|----|------|---------|---------|-------|--------| docker: ❯ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
138d6ff342c3 gcr.io/k8s-minikube/kicbase:v0.0.37 "/usr/local/bin/entr…" 4 minutes ago Up 4 minutes 127.0.0.1:52666->22/tcp, 127.0.0.1:52667->2376/tcp, 127.0.0.1:52669->5000/tcp, 127.0.0.1:52665->8443/tcp, 127.0.0.1:52668->32443/tcp minikube minikube start:
I think in this case, running |
Although one interesting idea is we could set the IP directly on the node. Minikube currently infers the IP from the driver much later in the provisioning, however, I don't see any reason this couldn't be set earlier. I'll have to play around with it a bit to see if this is feasible. The main advantage is it would provide a better recovery path without having to delete the cluster manually or mess around with terraform state |
Hey @scott-the-programmer , I have actually ran |
I'm wondering if #66 fixes the issue - I noticed similar behavior due to the provider using the wrong ssh client by default. This would result in a partially configured cluster returning the |
I've been using mainly |
Hi, I am running into the same |
Hey @pgebert - If you delete the cluster with |
Trying to create a simple minikube_cluster resource with terraform and terraform-provider-minikube failes with the following errors
Looking at the rootcasue it seems with the provider the kubeadm config contains a
apiServer.certSANs
value with "".The "" string entry is invalid.
I looked into the implementation and this implementations seems to be using minikube library instead of just using os.Exec command to start a local minikube. This way we are missing a lot of default check and runtime override done by minikube cli.
The text was updated successfully, but these errors were encountered: