Closed elico closed 6 months ago
Sam issues here @elico am facing. i check this url[https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0\r/aio/deploy/recommended.yaml] and its throwing 404 file not found. @bibinwilson, please what could go wrong here, we cant access the dashboard and stuck to finish the setup. here is the same error output: clusterrolebinding.rbac.authorization.k8s.io/admin-user created node01: Deploying the dashboard... node01: + echo 'Deploying the dashboard...' node01: + sudo -i -u vagrant kubectl apply -f $'https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0\r/aio/deploy/recommended.yaml' node01: error: the URL passed to filename "https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0\r/aio/deploy/recommended.yaml" is not valid: parse "https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0\r/aio/deploy/recommended.yaml": net/url: invalid control character in URL 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.
@bibinwilson could it be that grep search here was supposed to be a / slash instead of a backslash:
DASHBOARD_VERSION=$(grep -E '^\sdashboard:' /vagrant/settings.yaml | sed -E 's/[^:]+: //')
Suggestion: Replace the line from: DASHBOARD_VERSION=$(grep -E '^\sdashboard:' /vagrant/settings.yaml | sed -E 's/[^:]+: //') To: DASHBOARD_VERSION=$(grep -E '^\sdashboard:' /vagrant/settings.yaml | sed -E 's/[^:]+: //;s/\r//')
DASHBOARD_VERSION=$(grep -E '^\s*dashboard:' /vagrant/settings.yaml | grep -E -o '[0-9.]+')
Fixed
The "DASHBOARD_VERSION" determined by: https://github.com/techiescamp/vagrant-kubeadm-kubernetes/blob/main/scripts/dashboard.sh#L9
is including a return "\r" character and it blocks the installation scripts.