- Install latest minikube release on your laptop.
- Install latest kubectl tool on your laptop.
- Set the memory size for minikube VM to at least 4GB
minikube config set memory 4096
- Start the minikube
minikube start
- Enable ingress in minikube
minikube addons enable ingress
- There are Dockerfiles in this repo which building apps with following step, eg.
ADD airports-assembly-1.0.1.jar app.jar
. For objective reasons, I do not push these jars to the repo. - Since in the minikube ingress is enabled as an addon, the nginx-ingress-controller automatically exposes 80 and 443 ports (and not 8000).
- Docker images are available at my docker hub page. But of course You can take as a basis my Dockerfile and release image anywhere.
- You can start bash script
start.sh
for startup of initial stack. - You can start your services by yourself. Recommended: use kubectl auto-completion
- Create namespaces
- Apply service.yaml + ing-service.yaml
- Check API endpoints: countries.example.com - for countries service; airports.example.com - for airports service
service | endpoint | result |
countries v1.0.1 | /countries | full list of countries |
/countries/<qry> | to search by name \ iso code | |
airports v1.0.1 | /airports | full list of airports |
/airports/<qry> | to get a list of airports based on country code (e.g.: "nl") | |
airports v1.1.0 | /airports/<id> | Returns the full information of an airport based on its identifier. E.g.: /airports/EHAM returns all information for Schiphol. |
/airports?full=[0|1] | Returns a summary or all details of all airports, depending on the value of full. | |
/search/<qry> | Returns a list of airports based on a country code search. |
kubectl set image deployment airports airports=flomsk/airports:v1.1.0 -n airports-ns
- check status with:
kubectl rollout status deployment airports -n airports-ns
After you have played with services it's desirable to clean your laptop.
kubectl delete ns airports-ns && kubectl delete ns countries-ns
minikube stop && minikube delete
- clear your entries in
/etc/hosts
file