Docker 桌面版 国内无痛开启内置的 k8s
文章目录
痛在哪里?
k8s.gcr.io 国内访问不了
怎么办?
开启一个 local server 即可
修改 hosts
ip k8s.gcr.io gcr.io
ip 为路由器分配给电脑的 ip,请勿填写 127.0.0.1
当然我这里的 local server 部署在本机,如果你部署到其他机器,只需将 ip 地址填写对应的就行。
了解 k8s 的应该知道 /etc/hosts 是什么意思,怎么改,如果不会,请在 issue 中提问。
将 gcr.io k8s.gcr.io 添加到非安全 registry
Docker 设置 -> Daemon -> Basic -> insecure registries
gcr.io
k8s.gcr.io
开启
$ git clone --depth=1 https://github.com/khs1994-docker/lnmp.git
$ cd lnmp
# 开启 local server
$ ./lnmp-docker gcr.io
# 查看日志
$ ./lnmp-docker gcr.io logs
# 从设置中查看 k8s 状态,开启成功之后关闭 local server
$ ./lnmp-docker gcr.io down
Windows
powershell 禁止执行脚本?
请以管理员身份执行 set-ExecutionPolicy RemoteSigned 之后输入 Y 确认。
版本问题
只支持最新版 EDGE
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论