This republic long vacation has enabled to play with certain deployment with Minikube. To start with I tried to upgrade my minikube version with 0.25 but that did not work. Then when I have raised issues with the minikube and as of now I need to be contended with V0.24.1. Then I wanted to host a .NET core app. After performing the necessary containerization with Docker, I had put it in my docker hub. Then the funs starts.
When we try to kubectl deployment and services, they get created but not the public routes are not getting created. So who all the saga started. I went through many articles. One asked me to deploy the ngnix ingress controller with all certificate generation etc:- . So after burning two days I found that through this works it was unstable. In fact when I gave
Minikube addons enable Ingress
it was leaving with an unstable cluster.
So back to square 1, clear everything and reinstall the cluster. Now after doing some research I landed up http://kompose.io/. This is a booty. I was suppose to write simple docker-compose.yaml file and simply use the tool. So what did my docker-compose.yaml looked like
version: ‘3’services:readfromcache:image: venkateshsrini3/readfromcache:20180127041655build:context: .ports:– 80:80labels:kompose.service.type: LoadBalancer
Then also it did not work properly . The service did not get exposed. Then banging the head for a couple of hours lead me to the discovery that I had to give the last labels tag which needs to be compose.service.type: LoadBalancer.
So How did I deploy. Simple
Kompose UP from the directory in which I had the docker-compose.yaml
Once the app is redeployed, then we just have to say minikube service <>, phew the app started working.
So all the complexities are taken by compose. Now when we are working with a real time Kubernetes in AKS or GKE then we need to add an extra step of expose the service on type load balancer.
Happy week beginning.