https://rancher.com/ logo
Title
c

careful-oil-65588

04/11/2023, 4:51 AM
I successfully installed K3S. In the
control-plane
node, when I run
sudo k3s kubectl config view
I get the following kube config:
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: <https://127.0.0.1:6443>
  name: default
contexts:
- context:
    cluster: default
    user: default
  name: default
current-context: default
kind: Config
preferences: {}
users:
- name: default
  user:
    client-certificate-data: DATA+OMITTED
    client-key-data: DATA+OMITTED
Above configuration won't allow me to connect from a remote machine. Is there any way that I can get a kube config setting that allow me to do
kubectl
from a remote machine (means it include the user keys) ?
c

creamy-pencil-82913

04/11/2023, 5:11 AM
You're familiar with what 127.0.0.1 is, right? Just change that to the address of your server when using the file on a different host. https://docs.k3s.io/cluster-access#accessing-the-cluster-from-outside-with-kubectl
👍 1