kubernetes - Bootstrapping docker deamon -
in official kubernetes multinode docker guide , mentioned need docker instance:
a bootstrap docker instance used start etcd , flanneld, on kubernetes components depend
so bootstrap instance , how make sure keeps running on restarts ?
the documentation gives detailed explanation purpose of bootstrap instance of docker:
this guide uses pattern of running 2 instances of docker daemon: 1) bootstrap docker instance used start etcd , flanneld, on kubernetes components depend 2) main docker instance used kubernetes infrastructure , user’s scheduled containers
this pattern necessary because flannel daemon responsible setting , managing network interconnects of docker containers created kubernetes. achieve this, must run outside of main docker daemon. however, still useful use containers deployment , management, create simpler bootstrap daemon achieve this.
in summary special bootstrap docker daemon runs bits kubernetes depends on, freeing the normal docker daemon managed kubernetes. trick leverages fact both etcd , flanneld can run containers. alternatively 1 have set them locally services.
as ensuring bootstrapping docker daemon survives restart, answer lies within code. here's it's being called when running master.sh script.
- https://github.com/kubernetes/kube-deploy/blob/master/docker-multinode/master.sh#l36
- https://github.com/kubernetes/kube-deploy/blob/master/docker-multinode/docker-bootstrap.sh#l20
so code attempts setup service docker daemon process.
Comments
Post a Comment