我已经部署了一个新的资源组和 kubernetes 集群,使用 acs-engine 来提取文章并通过 VSTS 中的这些 ARM 模板发布。Kubernetes 集群已创建,但是当您 ssh 进入主 docker-engine 时尚未安装。跑步
`systemctl status kubelet`
显示该服务已死,当您尝试运行它时,它说 docker.service 已死。这无法启动,因为 docker 引擎不存在。
Reading package lists...
May 4 17:32:27 ubuntu cloud-init[2488]: W: GPG error:
https://apt.dockerproject.org/repo ubuntu-xenial InRelease: The
following signatures couldn't be verified because the public key is not
available: NO_PUBKEY F76221572C52609D
May 4 17:32:27 ubuntu cloud-init[2488]: W: The repository
'https://apt.dockerproject.org/repo ubuntu-xenial InRelease' is not
signed.
May 4 17:32:27 ubuntu cloud-init[2488]: Reading package lists...
May 4 17:32:27 ubuntu cloud-init[2488]: Building dependency tree...
May 4 17:32:27 ubuntu cloud-init[2488]: Reading state information...
May 4 17:32:27 ubuntu cloud-init[2488]: The following additional
packages will be installed:
May 4 17:32:27 ubuntu cloud-init[2488]: aufs-tools cgroupfs-mount
libltdl7
May 4 17:32:27 ubuntu cloud-init[2488]: Suggested packages:
May 4 17:32:27 ubuntu cloud-init[2488]: mountall
May 4 17:32:27 ubuntu cloud-init[2488]: The following NEW packages
will be installed:
May 4 17:32:27 ubuntu cloud-init[2488]: aufs-tools cgroupfs-mount
docker-engine libltdl7
May 4 17:32:27 ubuntu cloud-init[2488]: 0 upgraded, 4 newly installed,
0 to remove and 176 not upgraded.
May 4 17:32:27 ubuntu cloud-init[2488]: Need to get 19.4 MB/19.5 MB of
archives.
May 4 17:32:27 ubuntu cloud-init[2488]: After this operation, 102 MB
of additional disk space will be used.
May 4 17:32:27 ubuntu cloud-init[2488]: WARNING: The following
packages cannot be authenticated!
May 4 17:32:27 ubuntu cloud-init[2488]: docker-engine
May 4 17:32:27 ubuntu cloud-init[2488]: E: There were unauthenticated
packages and -y was used without --allow-unauthenticated
May 4 17:32:27 ubuntu cloud-init[2488]: Failed to restart
docker.service: Unit docker.service not found.
May 4 17:32:28 ubuntu cloud-init[2488]: usermod: group 'docker' does
not exist
当您尝试运行时,
apt-get install docker-engine
它会失败,如上所示。
运行
sudo apt-get install -y --allow-unauthenticated docker-engine
允许您安装 docker 引擎并启动 kubelet 服务。然后,您可以从主服务器访问集群。
但是,没有创建 .kube/config,因此您无法从外部源访问它。我可以从 master 创建 .kube/config 并且现在正在调查这个。
这需要修复,因为我正在自动化环境部署。