-
-
Save makr123/3629c3226579bd9f7870649f64671526 to your computer and use it in GitHub Desktop.
Minikube commands
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
# Start minikube cluster in local | |
minikube start | |
# optionally start with cpu s and memory | |
minikube start --cpus=4 --memory=4096 | |
# to change the docker machine to point to the kubernetes cluster | |
eval $(minikube docker-env) | |
# Note: Kubernetes supports docker version - 1.11.1. | |
# So if you have latest docker in local, then this might fail saying client version is greater than server version. | |
# To avoid this use, dvm | |
# to list available docker versions | |
dvm list | |
# to install docker version 1.11.1 | |
docker install 1.11.1 | |
# Note: dvm is not installed properly. After lot of struggle hardcoded the dvm helper path and made it work. | |
# 1. dvm_helper path is hard coded | |
# 2. cd -q option is changed to cd in dvm.sh file (ie., removed the DVM_OPTS flag) | |
# build all the docker images / pull the docker images | |
# to start the deployment | |
kubectl run hello-node --image=hello-node:v1 --port=8080 | |
# to view the pods | |
kubectl get pods | |
# to view the deployments | |
kubectl get deployments | |
# to view the services | |
kubectl get services | |
# to expose the service for the deployment | |
kubectl expose deployment hello-node --type=NodePort | |
# to delete the service and deployment | |
kubectl delete service,deployment hello-node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment