Setting up Minikube and Istio service mesh on your computer

Minikube is a tool that makes it easy to run Kubernetes locally. Here is the list of resources that will help you to set up Minikube on your machine along with Istio and other tools.

To Install:

  1. Install Minikube :
  2. Install Istio: 

Here is the quick summary of all commands for installing Minikube and Istio on macOS

Install Minikube
============

$ brew cask install minikube
$ minikube start --memory=16384 --cpus=4 --kubernetes-version=v1.14.2


Install Istio
========

$ curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.2.4 sh -
$ cd istio-1.2.4
$ export PATH=$PWD/bin:$PATH
$ for i in install/kubernetes/helm/istio-init/files/crd*yaml; do kubectl apply -f $i; done
$ kubectl apply -f install/kubernetes/istio-demo.yaml
$ get svc -n istio-system
$ kubectl get svc -n istio-system
$ get pods -n istio-system


Install Istio bookinfo demo app
===============================

$ kubectl label namespace default istio-injection=enabled
$ kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
$ kubectl get services
$ kubectl get pods
$ kubectl exec -it $(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}') -c ratings -- curl productpage:9080/productpage | grep -o ""
$ kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
$ kubectl get gateway
$ export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
$ export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}')
$ export INGRESS_HOST=$(minikube ip)
$ export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
$ printenv GATEWAY_URL


Try bookinfo demo app
=================

Open browser: http://192.168.99.113:31380/productpage (Please note that hostname:port used in the URL '192.168.99.113:31380' is derived from the output of  $printenv GATEWAY_URL )


The above resources will help you to set up the Minikube on your machine. I often run into issues with minikube instance that runs on on my macOS and then look around for  options to delete the faulty instance. Finally, I decided to note it down somewhere for quick access ;)

To Unistall Minikube:

$ minikube delete
$ brew cask uninstall minikube
$ rm -rf /usr/local/bin/minikube
$ rm -rf ~/.minikube .kube

Comments

  1. Transfer exchange and convert cryptocurrency withdraw Bitcoin to bank account in United States of America USA any bank like Jp morgan chase wells fargo.

    ReplyDelete
  2. If you have strong mood to exchange your bitcoins with US dollars then you must try bitcoin price to USD for the time being and you will always want to rely upon us after your first experience. If you think dollar rate is higher nowadays and bitcoin exchange with dollar can benefit you at this hour then it will be of no use to waste your time. Anymore. Your financial success is just few steps away from you.

    ReplyDelete

Post a Comment

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of my employer.