techiescamp / vagrant-kubeadm-kubernetes

Vagrantfile & Scripts to setup Kubernetes Cluster using Kubeadm for CKA, CKAD and CKS practice environment
https://devopscube.com/kubernetes-cluster-vagrant/
GNU General Public License v3.0
662 stars 672 forks source link

vagrant up not working due to repository signing issue #48

Closed BasharDlale closed 1 year ago

BasharDlale commented 1 year ago

master: W: GPG error: https://packages.cloud.google.com/apt kubernetes-xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05 master: E: The repository 'https://apt.kubernetes.io kubernetes-xenial InRelease' is not signed. The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

ronnelsantiago commented 1 year ago

I hit this same issue.

I use the URL from here and seems to work now. https://github.com/kubernetes/k8s.io/pull/4837#issuecomment-1446426585

Basically should be using https://dl.k8s.io/apt/doc/apt-key.gpg instead of https://packages.cloud.google.com/apt/doc/apt-key.gpghttps://github.com/techiescamp/vagrant-kubeadm-kubernetes/blob/285164e0988309abdbce8b680d735133219bc07c/scripts/common.sh#L71

BasharDlale commented 1 year ago

I hit this same issue.

I use the URL from here and seems to work now. kubernetes/k8s.io#4837 (comment)

Basically should be using https://dl.k8s.io/apt/doc/apt-key.gpg instead of https://packages.cloud.google.com/apt/doc/apt-key.gpg

https://github.com/techiescamp/vagrant-kubeadm-kubernetes/blob/285164e0988309abdbce8b680d735133219bc07c/scripts/common.sh#L71

Thanks for the tip, now I get another error which is a missing file or directory, looks like there is a missing directory "config" in the repo!!

==> node01: Running provisioner: shell... node01: Running: C:/Users/Bashar/AppData/Local/Temp/vagrant-shell20230603-8236-f94ncb.sh node01: + config_path=/vagrant/configs node01: + /bin/bash /vagrant/configs/join.sh -v node01: /bin/bash: /vagrant/configs/join.sh: No such file or directory The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.