Comments (10)
Hi Ivan, I work with @aramisjohnson. I got a question. Is there a way to use the docker.sock from the host in all the k8s nodes? That way, we can run whatever we need in a container with --net=host
and not have the k8s nodes run with --net=host
? Great project by the way!
from kubeadm-dind-cluster.
Thanks @kokhang . You may try editing the script (dind-cluster-v1.6.sh
, the place is here) and adding -v /var/run/docker.sock:/var/run/outer-docker.sock
. Then you can use export DOCKER_HOST=unix:///var/run/outer-docker.sock
inside DIND containers to connect to the outer docker (If you're doing this from a pod, you'll also need to mount /var/run/outer-docker.sock
into the pod using hostPath
).
from kubeadm-dind-cluster.
Unfortunately I'm afraid it's not possible to set --net=host
for docker containers that represent nodes. The problem is that every node must have it's own IP address, it's impossible to run several kubelets on single IP. Or did I misunderstand the question?.. Could you please describe what's the problem with rbd commands exactly?
from kubeadm-dind-cluster.
hmm... the problem is I am create a rook pod/cluster inside of v1.6 cluster but when I attempt to launch a pod that mounts a created block or filesystem volume it times out waiting for mount operation to complete. When I use just straight kubeadm, this starting a pod that consumes a block volume succeeds (not Dind). The only thing different I see between what your scripts do and kubeadm init does, is weave. Although I do see weave as an option for CNI_PLUGIN in your script, but my vm just hung create the k8s cluster. Im going to restore my vm from a snapshot and try it again, to see if I can get weave to work with the mirantis script.
from kubeadm-dind-cluster.
I didn't try Rook on DIND yet, it may be very well some deep Ceph-related issue. I'll definitely try it, although can't guarantee that I'll be able to do it quickly unfortunately. As of weave, it should work with 1.6, please try to do ./dind-cluster.sh clean
before changing CNI_PLUGIN
from kubeadm-dind-cluster.
But frankly I doubt Weave will help wigh rook, to fix this it's necessary to look inside rook's pod
from kubeadm-dind-cluster.
Please try it and let me know whether it works, although I'm not quite sure how to add this functionality to the script myself because it's a bit exotic use of DIND.
from kubeadm-dind-cluster.
Thanks @ivan4th. This worked for me. I couldnt map the socke to /var/run/outer-docker.sock in the container node but i was able to map it to /opt/outer-docker.sock. I think this should unblock @aramisjohnson and not have to do net=host for rook.
from kubeadm-dind-cluster.
Glad it helped. I actually thought about adding a mechanism to access host docker socket from within containers, it can be useful for e.g. implementing flexvolume driver based on docker volumes (such volumes can be accessible from all nodes in DIND, with possibility to add minikube-like automatic provisioning later). Today I stumbled upon a problem in k8s flexvolume code though, it fails to unmount volumes mounted using mount --bind
, so don't know whether this will make sense unless I fix flexvolume code in k8s....
from kubeadm-dind-cluster.
It looks like the issue is solved for now
from kubeadm-dind-cluster.
Related Issues (20)
- Cannot access the dashboard after a fresh install.... HOT 7
- Custom image problem with Docker 18.09 HOT 2
- 1.13 fails starting on MacOS HOT 5
- error using DIND_DAEMON_JSON_FILE HOT 9
- Old kubernetes dashboard deployment HOT 2
- docker on zfs needs additional package HOT 4
- dind::run duplicates command options HOT 4
- dind-cluster.sh scripts use pattern match comparison
- Allow cluster nodes to join custom network(s) besides the default kubeadm-dind-net HOT 1
- How to access ingress (macOS) HOT 5
- test_src_master build fails due to recent change from Kubernetes src HOT 1
- v1.14 script? HOT 4
- v1.12 kubeadm template is not setting cluster dns HOT 3
- DNS issues resolving svc.cluster.local addresses HOT 3
- centos HOT 1
- rbac rules not enforced HOT 2
- Move DIND --> retired in favor of KIND HOT 3
- Calico on 1.14 fails because kernel has loose RPF checking configured HOT 2
- dind-cluster-v1.13.sh up failed on windows 10 HOT 2
- init fails when run in systemd HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubeadm-dind-cluster.