问题
在 安装 kubernetes-dashboard 时,需要执行以下命令:
wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.3/aio/deploy/recommended.yaml
正常情况会报错
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 0.0.0.0, ::
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|0.0.0.0|:443... failed: Connection refused.
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|::|:443... failed: Connection refused.
此时需要 修改 hosts 文件,添加 DNS 解析,具体步骤如下;
1、
进入 IPAddress.com 首页,或进入 https://site.ip138.com/raw.Githubusercontent.com/ ,
输入 raw.githubusercontent.com 查询到真实IP地址,为 199.232.68.133 ;
2、在 ubuntu 上 测试 ping 真实IP ,看是否可以ping通;
ping 199.232.68.133
3、修改hosts
sudo vim /etc/hosts
199.232.68.133 raw.githubusercontent.com
保存
4、测试
再次执行如下命令即可成功;
wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.3/aio/deploy/recommended.yaml
版权声明:本文为Ezrealer原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。