Last active
July 2, 2016 19:57
-
-
Save reinaldomendes/51f2703dfccea81167eac36dd585c7e0 to your computer and use it in GitHub Desktop.
Kubernets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Stop services on port 80 and 8080 before do that | |
# | |
export ARCH=amd64 | |
export K8S_VERSION=$(curl -sS https://storage.googleapis.com/kubernetes-release/release/stable.txt) | |
docker run -d \ | |
--volume=/:/rootfs:ro \ | |
--volume=/sys:/sys:rw \ | |
--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 \ | |
gcr.io/google_containers/hyperkube-${ARCH}:${K8S_VERSION} \ | |
/hyperkube kubelet \ | |
--containerized \ | |
--hostname-override=127.0.0.1 \ | |
--api-servers=http://localhost:8080 \ | |
--config=/etc/kubernetes/manifests \ | |
--cluster-dns=10.0.0.10 \ | |
--cluster-domain=cluster.local \ | |
--allow-privileged --v=2 | |
curl -sSL "http://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/${ARCH}/kubectl" | sudo dd of=/usr/bin/kubectl | |
chmod +x /usr/bin/kubectl | |
#stop kuberners | |
docker stop $(docker ps -a | grep gcr.io | awk '{print $1}') | |
#rm kubernets | |
docker rm $(docker ps -a | grep gcr.io | awk '{print $1}') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment