I'm trying to run Kubernetes (Hyperkube) locally using Docker in my machine:
I run this command in order to run the kubelet container:
docker run \
--volume=/:/rootfs:ro \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:rw \
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \
--volume=/var/run:/var/run:rw \
--net=host \
--pid=host \
--privileged=true \
--name=kubelet \
-d \
gcr.io/google_containers/hyperkube-amd64:${K8S_VERSION} \
/hyperkube kubelet \
--containerized \
--hostname-override="127.0.0.1" \
--address="0.0.0.0" \
--api-servers=http://localhost:8080 \
--config=/etc/kubernetes/manifests \
--cluster-dns=10.0.0.10 \
--cluster-domain=cluster.local \
--allow-privileged=true --v=2
that runs all the other Kubernetes components. But some components (api server, controller manager...) inmediatelly are exited.
controller manager container (exited) logs
I0425 13:47:27.265926 1 plugins.go:71] No cloud provider specified.
I0425 13:47:27.266077 1 replication_controller.go:208] Starting RC Manager
I0425 13:47:27.266208 1 nodecontroller.go:143] Sending events to api server.
E0425 13:47:27.273153 1 nodecontroller.go:229] Error monitoring node status: Get http://127.0.0.1:8080/api/v1/nodes: dial tcp 127.0.0.1:8080: connection refused
E0425 13:55:55.950012 1 controllermanager.go:216] Failed to start service controller: ServiceController should not be run without a cloudprovider.
I have tried to use --cloud-provider=""
option in above run command but it still is not working.