ben.oz
January 17, 2024, 2:26pm
#1
Got these errors after “vagrant up”. Have no idea. Pls help!
There are errors in the configuration of this machine. Please fix
the following errors and try again:
shell provisioner:
path
for shell provisioner does not exist on the host system: C:/Users/ben/Desktop/kubernetes_install_kubeadm/ubuntu/vagrant/setup-hosts.sh
path
for shell provisioner does not exist on the host system: C:/Users/ben/Desktop/kubernetes_install_kubeadm/ubuntu/update-dns.sh
path
for shell provisioner does not exist on the host system: C:/Users/ben/Desktop/kubernetes_install_kubeadm/ubuntu/ssh.sh
File provisioner:
File upload source file C:/Users/ben/Desktop/kubernetes_install_kubeadm/ubuntu/tmux.conf must exist
File upload source file C:/Users/ben/Desktop/kubernetes_install_kubeadm/ubuntu/vimrc must exist
This is the Vagrant file i have used:
# -*- mode: ruby -*-
# vi:set ft=ruby sw=2 ts=2 sts=2:
# Define the number of master and worker nodes
# If this number is changed, remember to update setup-hosts.sh script with the new hosts IP details in /etc/hosts of each VM.
NUM_WORKER_NODE = 2
IP_NW = "192.168.56."
MASTER_IP_START = 10
NODE_IP_START = 20
# Sets up hosts file and DNS
def setup_dns(node)
# Set up /etc/hosts
node.vm.provision "setup-hosts", :type => "shell", :path => "ubuntu/vagrant/setup-hosts.sh" do |s|
s.args = ["enp0s8", node.vm.hostname]
end
# Set up DNS resolution
node.vm.provision "setup-dns", type: "shell", :path => "ubuntu/update-dns.sh"
end
This file has been truncated. show original
Vagrant needs not only a Vagrantfile; it needs to run in directory that contains any resources that the Vagrantfile refers to. Assuming you’ve installed the course repo in your Desktop directory,
cd C:\Users\ben\Desktop\certified-kubernetes-administrator-course\kubeadm-clusters]virtualbox
vagrant up
If you do it this way, Vagrant will be able to find the files in question.
1 Like
ben.oz
January 17, 2024, 3:59pm
#3
Many Thanks. Exactly, i used only the Vagrantfile. that was the problem
I was also facing similar issue - while setup local k8s environment. install virtualBox and Vagrant.
I’m able to up the Master and nodes using vagrant.
but when I try to do ssh , I’m getting [email protected] : Permission denied (publickey).
Could someone help me to resolve it ?
How are you accessing the nodes via ssh? Using ssh directly (which would fail the way you’re suggesting) or be doing vagrant ssh kubemaster
, as an example?
I’m using vagrant , like vagrant ssh kubemaster
@cloudteam2050 what platform are you using Vagrant on? There’s an issue I’ve heard of on Windows that presents like this; see if the following issue applies to your problem .