Minikube | Kubernetes
Installation / Starting Minikube (tested for windows)
Install ChocolateyInstalling Chocolatey
Install Minikube Welcome!
choco install minikube
Install kubectl Getting started
choco install kubernetes-cli
Install kubernetes-kompose
choco install kubernetes-kompose
(If kubernetes files not existing): Create Kubernetes Configuration Files
kompose convert -f docker-compose.yaml --out minikube
Start Docker
Start minikube
minikube start
Set minikube as docker env
minikube docker-env | Invoke-Expression
Build qunicorn image
docker build -t qunicorn:local .
Start services and pods with configuration
kubectl apply -f minikube
Expose qunicorn through minikube (start in another terminal)
minikube tunnel
List service information using
kubectl get svc
Get existing pos and fill database with data
kubectl get po --selector=io.kompose.service=server
kubectl exec {name of server pod} -- python -m flask create-and-load-db
Now you can access qunicorn using [EXTERNAL-IP]:8080/swagger-ui of the server service
Other useful commands
Clear all kubectl pods and services
kubectl delete daemonsets,replicasets,services,deployments,pods,rc,ingress --all --all-namespaces
Expose service and create Tunnel
minikube service {service}