https://rancher.com/ logo
Title
m

many-journalist-64069

11/26/2022, 4:18 AM
Ladies and gentlemen, after the agent node deployment, my k3s prompts such an error. What is the cause
f

flat-continent-80260

11/26/2022, 12:49 PM
It shouldn't be talking to port 8080. But 6443. This usually means kubectl doesn't have access to the yaml conf.
m

many-journalist-64069

11/26/2022, 12:50 PM
Sorry, I don't quite understand the k3s configuration, which files should I modify?
f

flat-continent-80260

11/26/2022, 12:50 PM
Did you move the config to the location you specified?
And check the permissions
m

many-journalist-64069

11/26/2022, 12:51 PM
/etc/rancher/k3s/config.yaml
This is the position?
f

flat-continent-80260

11/26/2022, 12:54 PM
Or k3s.yaml. not next to a computer
Or is it in that directory you specified? If so try to export that path so kubectl knows where to look
m

many-journalist-64069

11/26/2022, 12:56 PM
I didn't use 'K3S_CONFIG_FILE' to specify it
Where should it go?
Even though I specify its location, it seems to be blank
f

flat-continent-80260

11/26/2022, 12:59 PM
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
Try running this
And then kubectl get nodes
m

many-journalist-64069

11/26/2022, 1:02 PM
Thank you very much for your answer. Are you the maintainer of the k3s community
f

flat-continent-80260

11/26/2022, 1:04 PM
Nope. Just someone who has stumbled around playing with k3s and happened to see your message ­čśä
m

many-journalist-64069

11/26/2022, 1:05 PM
Nice to meet you. What you met is a junior undergraduate student from China. There is an assignment about k3s
f

flat-continent-80260

11/26/2022, 1:10 PM
Neat!
Nice to meet you
The problem was kubectl was looking for a config file, couldn't find one and tried a basic setup.
m

many-journalist-64069

11/26/2022, 1:15 PM
yep, great article, thanks so much for your help
If you have any questions, please be sure to contact me, I will try my best to help you, about me, this is my GitHub https://github.com/cubxxw
­čĺ» 1