https://rancher.com/ logo
Title
p

polite-engineer-55788

06/09/2022, 9:58 AM
I dont see
rdctl
has ability to pull down the
kubeconfig
from the VM, do we have any plan to support that command if not happy to request for that feature
f

freezing-airplane-30363

06/09/2022, 12:20 PM
Hi, not sure if that is really needed. In case the rd is properly installed, one can use
kubectl config view --raw
to get the
kubeconfig
or simply cp from
~/.kube/config
f

fast-garage-66093

06/09/2022, 3:45 PM
As @freezing-airplane-30363 said, it is already on your local machine. If for whatever reason you need an "unmerged" copy, you could fetch it with
rdctl shell sudo cat /etc/rancher/k3s/k3s.yaml
You will need to make sure k3s is properly initialized, so you get a working copy and not a stale one. RD takes care of that for the config that is merged into your
~/.kube/config
p

polite-engineer-55788

06/09/2022, 4:17 PM
OK. thanks. Its more of convenience when my default Kubeconfig is kind of have huge list and I just need RD ( thought I can do that with jq/yq)
I am also looking at way to replace the 127.0.0.1 address in the config with RD IP
f

fast-garage-66093

06/09/2022, 4:42 PM
sed
? 😄
p

proud-jewelry-46860

06/09/2022, 5:42 PM
kubectl config view --minify --flatten
?
👍 1