Skip to content

Instantly share code, notes, and snippets.

@wellsie
Created January 11, 2016 22:52
Show Gist options
  • Save wellsie/b1c30fc2b2119ee5714c to your computer and use it in GitHub Desktop.
Save wellsie/b1c30fc2b2119ee5714c to your computer and use it in GitHub Desktop.
kubernetes in docker-machine
etcd:
image: gcr.io/google_containers/etcd:2.0.12
net: host
command: /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
kubernetes:
image: gcr.io/google_containers/hyperkube:v1.0.1
net: host
pid: host
privileged: true
volumes:
- /:/rootfs:ro
- /sys:/sys:ro
- /dev:/dev
- /var/lib/docker/:/var/lib/docker:ro
- /var/lib/kubelet/:/var/lib/kubelet:rw
- /var/run:/var/run:rw
command: /hyperkube kubelet --containerized --hostname-override="127.0.0.1" --address="0.0.0.0" --api-servers=http://localhost:8080 --config=/etc/kubernetes/manifests
proxy:
image: gcr.io/google_containers/hyperkube:v1.0.1
net: host
privileged: true
command: /hyperkube proxy --master=http://127.0.0.1:8080 --v=2
#!/bin/bash -eux
machine=default ; ssh -i ~/.docker/machine/machines/$machine/id_rsa -L 8080:127.0.0.1:8080 -N docker@$(docker-machine ip $machine) &
kubectl -s http://localhost:8080 get no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment