rancher / rke

Rancher Kubernetes Engine (RKE), an extremely simple, lightning fast Kubernetes distribution that runs entirely within containers.
Apache License 2.0
3.21k stars 581 forks source link

rks --dind fails with remote Docker daemon #1081

Open kkimdev opened 5 years ago

kkimdev commented 5 years ago

RKE version: rke version v0.1.15

Docker version: (docker version,docker info preferred) 18.09.0

Operating system and kernel: (cat /etc/os-release, uname -r preferred) Ubuntu 18.04.1 LTS (Bionic Beaver)

Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO) Windows WSL

cluster.yml file:

nodes:
  - address: cluster1-node1
    user: docker
    role: [controlplane,worker,etcd]
  - address: cluster1-node2
    user: docker
    role: [worker]
  - address: cluster1-node3
    user: ubuntu
    role: [worker]

Steps to Reproduce:

Results:

 $ ./rke up --dind --config cluster1.yml
INFO[0000] [dind] Pulling image [docker:17.03-dind] on host [tcp://192.168.99.100:2376]
INFO[0007] [dind] Successfully pulled image [docker:17.03-dind] on host [tcp://192.168.99.100:2376]
FATA[0008] Failed to start [rke-dind-cluster1-node1] container on host [tcp://192.168.99.100:2376]: Error response from daemon: linux mounts: path /var/lib/kubelet-rke-dind-cluster1-node1 is mounted on / but it is not a shared mount

Is remote Docker daemon supported with --dind option?

kkimdev commented 5 years ago

Just in case if needed: communicating a Docker instance through stdio piping https://gist.github.com/RickyCook/663b9f4ae53d454f73bf . I used this workaround to communicate with remote Docker instances.