techno-tim / k3s-ansible

The easiest way to bootstrap a self-hosted High Availability Kubernetes cluster. A fully automated HA k3s etcd install with kube-vip, MetalLB, and more. Build. Destroy. Repeat.
https://technotim.live/posts/k3s-etcd-ansible/
Apache License 2.0
2.41k stars 1.05k forks source link

Cilium Install - Ensure KUBECONFIG points to install users home directory #465

Closed pbolduc closed 8 months ago

pbolduc commented 8 months ago

This PR addresses the issue if the install user's home directory is not in /home/username. The Copy config file to user home directory task copies /etc/rancher/k3s/k3s.yaml to "{{ ansible_user_dir }}/.kube/config"

Without this change, when installing Cilium by a non-standard user, it will fail to set the KUBECONFIG correctly and the cilium installer will fail to fetch the k8s/k3s version with an error as described in https://github.com/techno-tim/k3s-ansible/issues/446.

Proposed Changes

Checklist

timothystewart6 commented 8 months ago

Thank you!