解决:The connection to the server raw.githubusercontent.com was refused - did you specify the right ho

When I deploy k8s cluster and install fannel

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

An error occurs:The connection to the server raw.githubusercontent.com was refused - did you specify the right host or port?
insert image description here

Reason: the external network is not accessible

Solution:

Check the real IP of raw.githubusercontent.com at https://www.ipaddress.com/ .
insert image description here

sudo vim /etc/hosts

join in

185.199.108.133  raw.githubusercontent.com

insert image description here
run again

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

You can successfully install fannel

insert image description here

Hope to help you!

Guess you like

Origin blog.csdn.net/Myx74270512/article/details/130534151