April 06, 2022

ISTIO: Istio and kind installations and Bookinfo application execution steps

What is istio:

Istio addresses the challenges developers and operators face with a distributed or microservices architecture. Whether you're building from scratch or migrating existing applications to cloud native, Istio can help.


Reference: https://istio.io/latest/about/service-mesh/

==

Install docker:

https://docs.docker.com/desktop/mac/install/

==

Create cluster using kind:

brew install kind

kind version

Demo file: https://github.com/ramanujadasu/istio-kind/blob/LearningMain/demo.yml

kind create cluster --config demo.yml --name cluster2

kind get clusters

Reference: https://kind.sigs.k8s.io/docs/user/quick-start/#installation

==

Checking cluster is installed successfully:

docker ps

==

Download Istio:

curl -L https://istio.io/downloadIstio | sh -

cd istio-1.13.2

export PATH=$PWD/bin:$PATH

==

Install Istio:

istioctl install --set profile=demo -y

kubectl label namespace default istio-injection=enabled

==

Modify the http2 and https ports:

Changes for http and https port info istio-ingressgateway:

kubectl edit service istio-ingressgateway -n istio-system

Update below nodeports: 

 - name: http2

    nodePort: 30080

    port: 80

    protocol: TCP

    targetPort: 8080

  - name: https

    nodePort: 30443

    port: 443

    protocol: TCP

    targetPort: 8443

==

Deploy the sample application:

kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml

kubectl get services

kubectl get pods

==

Verify everything is working correctly:

kubectl exec "$(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl -sS productpage:9080/productpage | grep -o "<title>.*</title>"

==

Open the application to outside traffic:

Associate this application with the Istio gateway:

kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml

==

Ensure that there are no issues with the configuration:

istioctl analyze

==

Set Gateway:

export GATEWAY_URL=localhost:80

==

Open browser and test bellow URL:

http://localhost:80/productpage



No comments:

Post a Comment

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

My Favorite Site's List

#update below script more than 500 posts