Kube Get Config
Get config and exposed key
kubectl command vs /etc/rancher/k3s/k3s.yaml
kubectl config view --raw
is the command to get the current kube config in use by the kubectl CLI./etc/rancher/k3s/k3s.yaml
is the file where the kube config is stored when using k3s. This is the source of truth for our cluster configuration.
Taking the kube config from the kubectl command is not recommended as it may not reflect the actual configuration of the cluster.
so to update your local kube config for lens
sh
# use this
cat /etc/rancher/k3s/k3s.yaml
# instead of this
kubectl config view --raw
On local you can do
sh
cat /etc/rancher/k3s/k3s.yaml > D:\.kube\config\local.yml