Skip to content

Instantly share code, notes, and snippets.

@hsfeng
Last active April 24, 2017 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hsfeng/7fa5b57b68a62d7f14f3a10fc7db46cf to your computer and use it in GitHub Desktop.
Save hsfeng/7fa5b57b68a62d7f14f3a10fc7db46cf to your computer and use it in GitHub Desktop.
Using k8sup to bootstrap a Kubernetes cluster on Ubuntu 16.04.2
# Install docker 1.12.x
sudo apt-get update
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
sudo apt-get update
apt-cache policy docker-engine
sudo apt-get install -y docker-engine=1.12.6-0~ubuntu-xenial
sudo usermod -aG docker $(whoami)
# Stop and disable systemd-timesyncd
sudo systemctl stop systemd-timesyncd
sudo systemctl mask systemd-timesyncd
# Run k8sup
docker run -d --privileged --net=host --pid=host --restart=always \
-v $(which docker):/bin/docker:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/lib/:/host/lib:ro \
-v /usr/lib/x86_64-linux-gnu/libltdl.so.7:/usr/lib/libltdl.so.7 \
-v /lib/modules:/lib/modules:ro \
-v /etc/cni:/etc/cni \
-v /var/lib/cni:/var/lib/cni \
-v /var/lib/etcd:/var/lib/etcd \
-v /var/lib/kubelet:/var/lib/kubelet \
-v /etc/kubernetes:/etc/kubernetes \
--name=k8sup cdxvirt/k8sup:latest \
--network=<your-host-ip>
# have fun!:)
@doggy8088
Copy link

回報一個錯誤:Line 22 結尾有多一個空白字元,直接複製貼上會讓指令無法正常執行。

@hsfeng
Copy link
Author

hsfeng commented Apr 24, 2017

@doggy8088 已更新,謝謝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment