Last active
November 25, 2015 16:20
-
-
Save siennathesane/f8556b000c715ac8cd98 to your computer and use it in GitHub Desktop.
Local automated Kubernetes installation via Docker.
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
| #! /bin/bash | |
| if [ "$(id -u)" != "0" ]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
| wget -qO- https://get.docker.com/ | sh | |
| usermod -aG docker `whoami` | |
| docker run --net=host -d gcr.io/google_containers/etcd:2.0.12 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data | |
| 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 \ | |
| --pid=host \ | |
| --privileged=true \ | |
| -d \ | |
| gcr.io/google_containers/hyperkube:v1.0.1 \ | |
| /hyperkube kubelet --containerized --hostname-override="127.0.0.1" --address="0.0.0.0" --api-servers=http://localhost:8080 --config=/etc/kubernetes/manifests | |
| docker run -d --net=host --privileged gcr.io/google_containers/hyperkube:v1.0.1 /hyperkube proxy --master=http://127.0.0.1:8080 --v=2 | |
| wget https://storage.googleapis.com/kubernetes-release/release/v1.0.1/bin/linux/amd64/kubectl | |
| chmod a+x kubectl | |
| mv kubectl /usr/local/bin/kubectl | |
| echo "done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment