Minikube | Kubernetes

Installation / Starting Minikube (tested for windows)

  1. Install ChocolateyInstalling Chocolatey

  2. Install Minikube Welcome!

choco install minikube
  1. Install kubectl Getting started

choco install kubernetes-cli
  1. Install kubernetes-kompose

choco install kubernetes-kompose
  1. (If kubernetes files not existing): Create Kubernetes Configuration Files

kompose convert -f docker-compose.yaml --out minikube
  1. Start Docker

  2. Start minikube

minikube start
  1. Set minikube as docker env

minikube docker-env | Invoke-Expression
  1. Build qunicorn image

docker build -t qunicorn:local .
  1. Start services and pods with configuration

kubectl apply -f minikube
  1. Expose qunicorn through minikube (start in another terminal)

minikube tunnel
  1. List service information using

kubectl get svc
  1. 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
  1. 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}