Last active
March 3, 2016 23:00
-
-
Save clintkitson/48fad1790a79c8dca6c1 to your computer and use it in GitHub Desktop.
k8 docker-machine rexray demo
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
docker-machine create --driver=virtualbox k8 | |
eval $(docker-machine env k8) | |
VBoxManage setproperty websrvauthlibrary null | |
/Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv -H 0.0.0.0 -v | |
docker-machine ssh k8 "sudo mkdir -p /etc/rexray && sudo tee -a /etc/rexray/config.yml << EOF | |
rexray: | |
storageDrivers: | |
- virtualbox | |
modules: | |
default-docker: | |
rexray: | |
volume: | |
mount: | |
preempt: true | |
kubernetes: | |
type: docker | |
rexray: | |
volume: | |
mount: | |
preempt: true | |
ignoreUsedCount: true | |
virtualbox: | |
endpoint: http://10.0.2.2:18083 | |
tls: false | |
volumePath: /Users/clintonkitson/VirtualBox Volumes | |
controllerName: SATA | |
localMachineOrId: k8 | |
" | |
docker-machine ssh k8 sudo rm -Rf /var/lib/kubelet | |
docker run \ | |
--volume=/:/rootfs:ro \ | |
--volume=/sys:/sys:ro \ | |
--volume=/dev:/dev \ | |
--volume=/var/lib/docker/:/var/lib/docker:rw \ | |
--volume=/var/lib/kubelet/:/var/lib/kubelet:rw \ | |
--volume=/var/run:/var/run:rw \ | |
--volume=/etc/rexray:/etc/rexray:ro \ | |
--net=host \ | |
--pid=host \ | |
--privileged=true \ | |
-d emccode/hyperkube-amd64:v1.2.0-alpha.8 \ | |
/kubelet-runner.sh \ | |
--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=4 | |
docker run -ti --rm --net=host -v /var/lib/rexray:/var/lib/rexray emccode/hyperkube-amd64:v1.2.0-alpha.8 /bin/bash | |
./kubectl get nodes | |
## wait more | |
./kubectl create -f podvol.yml | |
./kubectl describe pod mypod1 | |
./kubectl create -f myclaim.yml | |
./kubectl describe pvc myclaim | |
./kubectl describe pv | |
./kubectl create -f podclaim.yml | |
./kubectl describe pods mypod2 | |
exit | |
docker ps | grep postgres | |
docker exec ti name df /var/lib/postgres/data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment