Last active
September 15, 2018 10:29
-
-
Save yagosys/87ee414c3c2cb64d45d8f3dfe2b75e5f to your computer and use it in GitHub Desktop.
k8s_on_mac
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
| Written with [StackEdit](https://stackedit.io/). | |
| Setup minikube on osx without using virtualbox | |
| 1. Virtualbox is ugly , for example if will power off your machine if battery is lower than 5%. since OSX has native hyperkit support for docker. for I want get rid of virtualbox. | |
| 3. The logic flow | |
| - [ ] remove old installation | |
| - [ ] install hyperkit | |
| - [ ] install minikube with driver hyperkit | |
| ``` | |
| brew install docker-machine-driver-hyperkit | |
| sudo chown root:wheel /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit | |
| sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit \ && sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit | |
| minikube start --logtostderr --v=3 --vm-driver=hyperkit | |
| kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080\ndeployment.apps | |
| kubectl expose deployment hello-minikube --type=NodePort | |
| minikube service hello-minikube --url | |
| eval $(minikube docker-env) | |
| brew install kubernetes-helm | |
| kubectl get svc -w --namespace default left-coral-gitlab-ee | |
| kubectl port-forward svc/aspiring-peahen-mysql 3306 & | |
| andywang@andywang-mbp ~/sh kubectl get secret --namespace default aspiring-peahen-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo | |
| FBPXrE0S03 | |
| mysql -h 127.0.0.1 -p -uroot | |
| ``` | |
| andywang@andywang-mbp ~/sh docker ps | grep hello | |
| ``` | |
| 3aecb7214acf k8s.gcr.io/echoserver "nginx -g 'daemon of…" 4 minutes ago Up 4 minutes k8s_hello-minikube_hello-minikube-6c47c66d8-d5x69_default_194a2980-b7a2-11e8-b5ed-563dcbb80f5a_0 | |
| ``` | |
| andywang@andywang-mbp ~/sh docker exec -it 3aecb7214acf bash | |
| ``` | |
| root@hello-minikube-6c47c66d8-d5x69:/# | |
| ``` | |
| ref: https://blog.arkey.fr/2018/06/18/minikube-with-hyperkit/ | |
| https://www.mirantis.com/blog/install-kubernetes-apps-helm/ | |
| <!--stackedit_data: | |
| eyJoaXN0b3J5IjpbLTM2ODcyMTg5LC0yMDk3NDIxMDA3XX0= | |
| --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment