minikube start
- Start a local Kubernetes cluster
minikube start
- Stop the local Kubernetes cluster
minikube stop
- manually import image into local cluster (by default, minikube uses the Docker Hub registry to pull images, and it doesn’t have access to your local ones. Therefore, it will not find the image you built for the Catalog Service application)
minikube image load catalog-service:0.0.1-SNAPSHOT
kubectl create deployment catalog-service --image=catalog-service:0.0.1-SNAPSHOT
kubectl expose deployment catalog-service --name=catalog-service --port=8080
###3 Port forwarding from localhost to Kubernetes cluster
kubectl port-forward service/catalog-service 8000:8080
kubectl delete deployment catalog-service
kubectl delete service catalog-service