https://rancher.com/ logo
#k3s
Title
# k3s
j

jolly-waitress-71272

11/22/2022, 4:56 PM
I'm trying to follow some instructions to set up some pods. What does this command do?
Copy code
k3s kubectl create secret generic kubeconfig --from-file=/etc/rancher/k3s/k3s.yaml
I'm looking at https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_create_secret_generic/ and what I think happens is the k3s.yaml gets stored in essentially a protected kubernetes var. Is this something people normally do for some reason? I don't see it referenced at any other point in the instructions.
s

sticky-summer-13450

11/22/2022, 5:08 PM
That command creates a kubernetes secret called
kubeconfig
in the default namespace. The contents of the secret will be the contents of the k3s.yaml file. It's not something I've ever needed, or seen done by anyone else.
☝️ 1
q

quick-dentist-45681

11/23/2022, 8:08 AM
Can't say it makes much sense either, you would need a valid kubeconfig to get it out again ... one case might be where you have one "main" kubernetes cluster, and store kubeconfigs for other clusters in the main cluster, but that's fairly unconventional I would say.
👍 2
j

jolly-waitress-71272

11/28/2022, 5:28 PM
In case anyone was curious why I needed this, I guess this is the path the team has chosen for implementing argo.