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

fetch kubeconfig from master after deployment #431

Closed gereonvey closed 9 months ago

gereonvey commented 9 months ago

Proposed Changes

This PR adds a final step to the site.yml playbook, downloading the ~/.kube/config file from the first master to kubekonfig in the playbook directory. This way you can export KUBECONFIG=${PWD}/kubeconfig, and deploy, reset, deploy, reset, deploy... and never worry about having the right kubeconfig. I deliberately placed this task in the playbook, it shouldn't be part of a (reusable) role.

Checklist

timothystewart6 commented 9 months ago

Thank you so much!