enhance upstart param for containerized kubelet

This commit is contained in:
He Simei 2015-10-13 10:39:33 +08:00
parent b255e7c478
commit 9c3600d5d3
5 changed files with 27 additions and 2 deletions

View File

@ -160,7 +160,18 @@ systemctl start docker
Ok, now that your networking is set up, you can startup Kubernetes, this is the same as the single-node case, we will use the "main" instance of the Docker daemon for the Kubernetes components. Ok, now that your networking is set up, you can startup Kubernetes, this is the same as the single-node case, we will use the "main" instance of the Docker daemon for the Kubernetes components.
```sh ```sh
sudo docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v1.0.1 /hyperkube kubelet --api-servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable-server --hostname-override=127.0.0.1 --config=/etc/kubernetes/manifests-multi --cluster-dns=10.0.0.10 --cluster-domain=cluster.local sudo docker run \
--volume=/:/rootfs:ro \
--volume=/sys:/sys:ro \
--volume=/dev:/dev \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \
--net=host \
--privileged=true \
--pid=host \
-d \
gcr.io/google_containers/hyperkube:v1.0.1 /hyperkube kubelet --api-servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable-server --hostname-override=127.0.0.1 --config=/etc/kubernetes/manifests-multi --cluster-dns=10.0.0.10 --cluster-domain=cluster.local
``` ```
> Note that `--cluster-dns` and `--cluster-domain` is used to deploy dns, feel free to discard them if dns is not needed. > Note that `--cluster-dns` and `--cluster-domain` is used to deploy dns, feel free to discard them if dns is not needed.

View File

@ -149,6 +149,7 @@ start_k8s(){
# Start kubelet & proxy, then start master components as pods # Start kubelet & proxy, then start master components as pods
docker run \ docker run \
--net=host \ --net=host \
--pid=host \
--privileged \ --privileged \
--restart=always \ --restart=always \
-d \ -d \

View File

@ -146,7 +146,18 @@ systemctl start docker
Again this is similar to the above, but the `--api-servers` now points to the master we set up in the beginning. Again this is similar to the above, but the `--api-servers` now points to the master we set up in the beginning.
```sh ```sh
sudo docker run --net=host -d -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v1.0.1 /hyperkube kubelet --api-servers=http://${MASTER_IP}:8080 --v=2 --address=0.0.0.0 --enable-server --hostname-override=$(hostname -i) --cluster-dns=10.0.0.10 --cluster-domain=cluster.local sudo docker run \
--volume=/:/rootfs:ro \
--volume=/sys:/sys:ro \
--volume=/dev:/dev \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \
--net=host \
--privileged=true \
--pid=host \
-d \
gcr.io/google_containers/hyperkube:v1.0.1 /hyperkube kubelet --api-servers=http://${MASTER_IP}:8080 --v=2 --address=0.0.0.0 --enable-server --hostname-override=$(hostname -i) --cluster-dns=10.0.0.10 --cluster-domain=cluster.local
``` ```
#### Run the service proxy #### Run the service proxy

View File

@ -151,6 +151,7 @@ start_k8s() {
# Start kubelet & proxy in container # Start kubelet & proxy in container
docker run \ docker run \
--net=host \ --net=host \
--pid=host \
--privileged \ --privileged \
--restart=always \ --restart=always \
-d \ -d \

View File

@ -100,6 +100,7 @@ docker run \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \ --volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \ --volume=/var/run:/var/run:rw \
--net=host \ --net=host \
--pid=host \
--privileged=true \ --privileged=true \
-d \ -d \
gcr.io/google_containers/hyperkube:v1.0.6 \ gcr.io/google_containers/hyperkube:v1.0.6 \