eval $(minikube docker-env)
build -t rest-api .
deploy image, pod/deployment rest-api --image-pull-policy=Never, stops it trying to pull from dockerHub
kubectl run rest-api --image=rest-api:latest --image-pull-policy=Never
kubectl get pods
C02S50ELG8WM:rest-api lukeloze$ kubectl get pods NAME READY STATUS RESTARTS AGE hello-foo-d88d775fc-2vqnd 1/1 Running 0 1h hello-node-7f5b6bd6b8-nwbmz 1/1 Running 0 5h rest-api-dd89fd864-xdn4g 1/1 Running 0 50s C02S50ELG8WM:rest-api lukeloze$ kubectl get deployments NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE hello-foo 1 1 1 1 1h hello-node 1 1 1 1 5h rest-api 1 1 1 1 1m
kubectl expose deployment rest-api --type=LoadBalancer --port=8003
minikube service rest-api
###############################################################################
kubectl create -f deployment.yaml
kubectl expose deployment rest-api-deployment --type=LoadBalancer --port=8005
#kubectl create -f deployment.yaml
#kubectl expose deployment rest-api --type=LoadBalancer --port=8000
#worked #kubectl run hello-foo --image=foo:0.0.1 --image-pull-policy=Never
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
C02S50ELG8WM:rest-api lukeloze$ kubectl expose deployment rest-api-deployment --type=LoadBalancer --port=8005
#Error from server (NotFound): deployments.extensions "rest-api" not found
kubectl expose deployment rest-api-deployment --type=LoadBalancer --port=8005