网络`hbase`被声明为外部,但找不到。在部署堆栈之前,您需要创建一个范围广泛的网络

时间:2019-09-30 04:01:05

标签: docker-compose docker-swarm docker-swarm-mode

我在docker swarm集群下面。

    $ sudo docker node ls
    ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
    iq7i01ns7ku7zrtaemiucoawi *   master.com          Ready               Active              Leader              19.03.2
    g6mug58tld4aikobdv3ic9p9y     worker1.com         Ready               Active                                  19.03.2
    uc13xcl9ttauzkqdz03kbrewt     worker2.com         Ready               Active                                  19.03.2
    c8uhfvyhhlmuxp2p3ei3ymrj5     worker3.com         Ready               Active                                  19.03.2

我想将hadoop platform部署到集群中。

    $ sudo docker stack deploy -c docker-compose-v3.yml hadoop
    network "hbase" is declared as external, but could not be found. You need to create a swarm-scoped network before the stack is deployed

如何解决此错误?

1 个答案:

答案 0 :(得分:1)

您需要先创建网络:

docker network create --driver overlay hbase

在您的compose中,将网络hbase指定为external,但似乎不存在这样的网络