BUG REPORT:
In the same way it was done with #1137 for flannel, and #1277 for weave, dockerd should be run with --iptables=true in order to have a working cluster when calico is set as the network plugin.
Environment:
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
Kubespray version (commit): c116b80
Network plugin used: calico
I am not sure if this is related, but I am using calico plugin as well. Running docker build commands on the cluster nodes is not possible because they can't access network without --iptables=true. The same problem appears when I run docker in the Kubernetes pod by mouting host's /var/run/docker.sock into the pod. Without iptables=true docker does not activate masquerading for docker0 network device, so docker build can't work properly when run in default network.
While checking iptables fix for flannel, I found that it was removed again in the commit a39e78d42d5bcb6893d0981fc478a3883364fdae.
I have encountered the same behaviour as described by dmrub.
Setting --iptables=true in DOCKER_OPTS in the file /etc/systemd/system/docker.service.d/docker-options.conf solved the issue.
The current version allows this to be done by setting docker_iptables_enabled to true.
This issue can be closed I think.
Most helpful comment
The current version allows this to be done by setting
docker_iptables_enabledto true.https://github.com/kubernetes-incubator/kubespray/blob/master/roles/docker/templates/docker-options.conf.j2
This issue can be closed I think.