Subin Suthan
Subin Suthan

Reputation: 107

Deploying NGINX ingress controller using kubectl for docker desktop throwing error

I am trying to spin up an INGRESS NGINX controller using the below command.

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.7.0/deploy/static/provider/cloud/deploy.yaml

But after executing, I am getting the below error

kubectl : Unable to connect to the server: dial tcp [2405:200:1607:2820:41::36]:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because the connected host has failed to respond. At line:1 char:1

Any suggestions to fix highly appreciated.

Upvotes: 0

Views: 339

Answers (1)

Jogeshwar Singh
Jogeshwar Singh

Reputation: 1

This error has nothing to do with ingress-nginx but rather the raw github content url seems to be an issue. The GitHub content domain has been blocked in some countries. There isn't a proper solution to this but rather a workaround. You could either :

  1. Set your DNS to

8.8.4.4 and/or 8.8.8.8.

These are managed by Google, and they are useful to bypass broken DNS from bad ISPs.

  1. If you are in Linux environment then open your terminal window and copy/paste the below command:
sudo -- sh -c "echo 185.199.108.133 raw.githubusercontent.com >> /etc/hosts"

For detailed explanation of this, you can look into this issue on github Not able to open https://raw.githubusercontent.com #42655

Upvotes: 0

Related Questions