Created
January 28, 2018 07:58
-
-
Save khajer/85019b367de675dbd5a3577d79d15804 to your computer and use it in GitHub Desktop.
note
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
| #------------------------------------- | |
| // monitor | |
| kubectl proxy -p 8080 -w . | |
| //http://127.0.0.1/ui | |
| kubectl run nginx --image=nginx | |
| //set local to pull container (with docker container) | |
| /* | |
| docker run -d -p 5000:5000 --restart=always --name registry registry:2 | |
| docker tag simpleweb_go localhost:5000/simpleweb_go | |
| */ | |
| //run container in kubenetes | |
| #------------------------------------ | |
| # | |
| kubectl run nginx --image=nginx --image-pull-policy=IfNotPresent | |
| kubectl run websim --image=khajer/simplewebgo:1 -l visualize=true,run=myserver --image-pull-policy=IfNotPresent | |
| kubectl run websim --image=khajer/simplewebgo:1 -l visualize=true,run=myserver --port=8080 --image-pull-policy=IfNotPresent | |
| kubectl run websim --image=khajer/simplewebgo:3 -l visualize=true,run=myserver --port=8080 --image-pull-policy=IfNotPresent | |
| // scale | |
| kubectl scale deployment websim --replicas=2 | |
| //expose | |
| kubectl expose deployment websim --port=8080 --type=LoadBalancer | |
| kubectl expose deployment websim --type=LoadBalancer | |
| kubectl expose deployment my-nginx --port=80 --type=LoadBalancer | |
| //test run | |
| minikube service websim <---//http://192.168.99.100:32332/ | |
| //update | |
| kubectl rolling-update websim --image=khajer/simplewebgo:2 --update-period=5s | |
| //minikube | |
| kubectl set image deployment/websim websim=khajer/simplewebgo:2 | |
| kubectl set image deployment/nginx-deployment nginx=nginx:1.9.1 | |
| ---------------------------------------------//////////////////////////////////////// | |
| ref: https://kubernetes.io/docs/tutorials/stateless-application/hello-minikube/#create-your-nodejs-application | |
| ---------------------------------------------//////////////////////////////////////// | |
| minikube service frontend --url | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment