This tutorial assumers that minikube kubernetes is already installed. Steps to install deploy a test application on kubernetes cluster:
- create deployment
kubectl create deployment hello-minikube --image=kicbase/echo-server:1.0
- Expose deployment
kubectl expose deployment hello-minikube --type=NodePort --port=8080
- View the service detail
kubectl get services hello-minikube
- Get yaml file of deployment
kubectl get deploy hello-minikube -o yaml
- Access the service in a web browser
minikube service hello-minikube
(to print url only use –url ) - Get all deployments
kubectl get deploy
- Delete a deployment
kubectl delete deploy hello-minikube
- Delete a service (get created during expose)
kubectl delete service hello-minikube