我正在设置一个 swarm 集群。我可以使用 docker -H :4000 info
查看详细信息。但是,当我尝试 docker -H :4000 node ls
时,它失败了。
操作系统 - RHEL 7
docker 版本:
$ docker version
Client:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built:
OS/Arch: linux/amd64
Server:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built:
OS/Arch: linux/amd64
docker 信息:
$ docker -H :4000 info
Containers: 23
Running: 23
Paused: 0
Stopped: 0
Images: 35
Server Version: swarm/1.2.5
Role: primary
Strategy: spread
Filters: health, port, containerslots, dependency, affinity, constraint
Nodes: 7
...
...
Plugins:
Volume:
Network:
Swarm:
NodeID:
Is Manager: false
Node Address:
Security Options:
Kernel Version: 3.10.0-327.18.2.el7.x86_64
Operating System: linux
Architecture: amd64
CPUs: 28
Total Memory: 114 GiB
Name: c7ef56122f88
Docker Root Dir:
Debug Mode (client): false
Debug Mode (server): false
docker 节点 ls:
docker -H :4000 node ls
*Error response from daemon: 404 page not found*
http-proxy.conf:
[Service]
[Service] Environment="HTTP_PROXY=http://proxy-domain.com:port" "HTTPS_PROXY=https://proxy-domain.com:port"
docker.conf:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock -g /docker --cluster-store=consul://0.0.0.0:8500 --cluster-advertise eth0:2375
不确定我在这里遗漏了什么。我的目标是应用群节点标签元数据,这样我就可以根据它们的大小制作不同的池。 任何帮助,将不胜感激。
PS: I am able run
docker -H 4000 pull
/start
/stop
/rmi
/rm
/network
commands without any issue. its the "node" command does not work with swarm cluster.
提前致谢
最佳答案
我目前正在使用带有服务发现(consul)的 docker swarm。 docker swarm 节点管理在新的 docker swarm 模式下可用(docker engine 1.12+ - https://docs.docker.com/engine/swarm/ 原生支持)。我会将基础设施更新为新的群模式,并在此处提供我的发现。
关于linux - docker swarm 在检查节点详细信息时抛出 404 页面未找到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40939665/