Open adamhgriffith-uofu opened 8 months ago
Yes,
This looks to be the same issue. In the linked commit above, maybe the task when
statement needs to read:
- name: Copy kubeconfig file from default location to the ~/.kube directory"
ansible.builtin.fetch:
src: /etc/rancher/k3s/k3s.yaml
dest: ~/.kube/config
flat: true
become: true
when:
- ansible_host != "localhost"
- download_kubeconfig
Happy to take a look at this.
So, after looking into this issue, we may need to be more clear about the function of the download_kubeconfig
variable. when installing a fresh k3s cluster, you'll very likely want to download the kubeconfig file to its default location that kubectl expects (~/.kube/config). Whether your cluster is running on localhost
, or a remote location, k3s will store it at /etc/rancher/k3s/k3s.yaml
. The conditional of ansible_host != "localhost"
is not necessary.
The reason that the download_kubeconfig
variable exists is for situations where you already have the kubeconfig file in ~/.kube/config
, and are running the installer against an existing k3s cluster (usually when upgrading ledger or ascender). I think a good option here may be to change the conditional to download_kubeconfig is true OR kube_install is true
.
@michaelford85 can we please look at https://github.com/ctrliq/ascender-install/issues/65 tagged release might help
Acknowledging this question and will respond.
The
default.config.yml
file'sdownload_kubeconfig:false
causes the following error when installing on localhost for a single-node K3s cluster:The related change from two months back is https://github.com/ctrliq/ascender-install/commit/e2bdd7e5eb24f24324270b3885e36343a4ee441e.
Changing to
download_kubeconfig:true
for the initial K3s install worked. Maybe the fix is to note this inascender-install-instructions/k3s/README.md
. To replicate, here is an examplecustom.config.yml
: