Containerising the Flask Application with Docker
docker build -t cloud-compiler-parcial .
Pushing the Docker Image to Docker Hub
docker tag cloud-compiler-parcial andrescmm/cloud-compiler-parcial
Inicia sesión
docker login
docker push andrescmm/cloud-compiler-parcial
Running a Docker Container
docker run -p 8080:8080 cloud-compiler-parcial
Minikube Kubernetes Cluster
minikube version
minikube start --driver=docker
Deploying to the Minikube Kubernetes Cluster
kubectl version --client
kubectl apply -f deployment.yml
Comprobation
kubectl get deployment
kubectl get service
Getting the Pods
kubectl get pods
kubectl get pods --all-namespaces
The Minikube Deployment Dashboard
minikube dashboard
minikube service cloud-compiler-parcial-service
kubectl delete deployment --namespace=default --all
kubectl scale deployment cloud-compiler-parcial --replicas=0
kubectl delete pod cloud-compiler-parcial-dcc6f77f9-k2tsx
Stop the cluster
minikube stop --all