Skip to content
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

Add both kubeconfig path/file vars to tfvars.example files #173

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

dkeightley
Copy link
Contributor

Resolves: #157

Add kubeconfig path and file vars to tfvars.example files to avoid confusion

@dkeightley dkeightley requested a review from kourosh7 January 8, 2025 00:47
Copy link

@kourosh7 kourosh7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the following to terraform.tfvars based on the modified example:

kube_config_path = "~/.kube"
kube_config_filename = "rancher-terraform.yml"

and it still gives the same error. Look at my terraform output:

$ terraform output
instances_private_ip = [
  [
    "172.31.26.225",
  ],
  [],
]
instances_public_ip = [
  [
    "35.166.95.8",
  ],
  [],
]
kubeconfig_file = "~/.kube"
rancher_bootstrap_password = "initial-admin-password"
rancher_hostname = "rancher.35.166.95.8.sslip.io"
rancher_url = "https://rancher.35.166.95.8.sslip.io"

you can see the kubeconfig_file value is incorrect. It's not appending the filename to the path

As mentioned previously, what works is:
It works fine when:

  1. kube_config_path is set to just a filename with no path
  2. Not setting any file/path in the terraform.tfvars file at all

Copy link

@kourosh7 kourosh7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works. LGTM

@dkeightley dkeightley merged commit 79aaf45 into main Feb 4, 2025
3 checks passed
@dkeightley dkeightley deleted the update-kc-path branch February 4, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Error: Kubernetes cluster unreachable" when creating upstream k3s cluster on aws
2 participants