0

I am attempting to setup the Kubernets Master node on a Jetson Nano. However, I am stuck at the step where you are supposed to download the flannel YAML. Everytime I get the same error:

Unable to connect to the server: x509: certificate is valid for 10.xx.x.x, 192.xxx.x.xx, not 127.0.0.1

I'm not sure why it is trying to connect to my local host to get the download. So far I have done the following:

sudo kubeadm reset

I would always delete the .kube/ folder in my home directory. Then I run:

sudo kubeadm init --pod-network-cidr=10.244.0.0/16
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

All of these commands execute no problem. For the first command I have also tried adding this line, but then I get an error saying it can't verify the certificate:

--apiserver-cert-extra-sans=127.0.0.1

I have tried two commands to download the YAML file

sudo kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

and

curl -sSL https://raw.githubusercontent.com/coreos/flannel/v0.12.0/Documentation/kube-flannel.yml | kubectl apply -f -

In the config file I have added the line

insecure-skip-tls-verify: true

right after the key, but this doesn't work either.

Is there something I am missing or need to change? None of the other solutions have worked.

I have used the following references:

Flannel network failing during Kubernetes installation, please suggest how to fix this

Kubernetes Setting Up Flannel Pod Network

https://github.com/kubernetes/kubernetes/issues/48378

x509 certificate signed by unknown authority- Kubernetes

microk8s, DEVOPS : Unable to connect to the server: x509: certificate is valid for <internal IPs>, not <external IP>

https://phoenixnap.com/kb/install-kubernetes-on-ubuntu

https://developer.nvidia.com/blog/deploying-ai-apps-with-egx-on-jetson-xavier-nx-microservers/

Z_F
  • 131
  • 4
  • 1
    Are you executing all commands from the master node ? Is it possible for you to provide the output of the `kubectl config view` command (without sensitive information) ? – matt_j Mar 05 '21 at 13:08
  • @matt_j So I ran that command and realized the cluster IP was set to the local host, so I just changed the IP in the k3s yaml file to the IP in listed on the certificate during the init command and it worked. Thanks for your suggestion. – Z_F Mar 05 '21 at 19:36
  • I'm glad you solved this problem :) Can you describe how you solved the problem and what was the cause in the answer ? It may be helpful for other community members. – matt_j Mar 16 '21 at 09:31

0 Answers0