Showing posts with label kind. Show all posts
Showing posts with label kind. Show all posts

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



Read more ...

ISTIO: View Dashboard usages

kubectl apply -f samples/addons

kubectl rollout status deployment/kiali -n istio-system

Kiali:

Kiali is a management console for Istio service mesh. Kiali can be quickly installed as an Istio add-on, or trusted as a part of your production environment. See below for more about what Kiali offers

istioctl dashboard kiali

http://localhost:20001/

Reference:

https://istio.io/latest/docs/tasks/observability/kiali/

https://kiali.io/

Open the terminal and run bellow command: 

for i in $(seq 1 100); do curl -s -o /dev/null "http://$GATEWAY_URL/productpage"; done

Now you can see the graphs: 






Reference: https://istio.io/latest/docs/setup/getting-started/

Prometheus:

Prometheus is an open source monitoring system and time series database. You can use Prometheus with Istio to record metrics that track the health of Istio and of applications within the service mesh. You can visualize metrics using tools like Grafana and Kiali.

istioctl dashboard prometheus

http://localhost:9090/

Reference:

https://istio.io/latest/docs/tasks/observability/metrics/using-istio-dashboard/

https://istio.io/latest/docs/tasks/observability/metrics/querying-metrics/

https://istio.io/latest/docs/ops/integrations/prometheus/

https://prometheus.io/

==

Jaeger:

It is open source, end-to-end distributed tracing and monitor and troubleshoot transactions in complex distributed systems

istioctl dash jaeger

http://localhost:16686/jaeger/search

https://www.jaegertracing.io/

==

Grafana:

istioctl d grafana

http://localhost:3000/?orgId=1

https://grafana.com/

==

Envoy:

istioctl d envoy productpage-v1-7ff6d55f74-pj8dm

https://istio.io/latest/docs/ops/diagnostic-tools/proxy-cmd/

http://localhost:15000/

==

Controlz:

istioctl d controlz istiod-699b647f8b-dgqw6

http://localhost:9876/metricz/

==

Zipkin:

Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in service architectures. Features include both the collection and lookup of this data.

istioctl dashboard zipkin

kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.13/samples/addons/extras/zipkin.yaml

References:
https://istio.io/latest/docs/ops/integrations/zipkin/#installation

https://istio.io/latest/docs/tasks/observability/distributed-tracing/zipkin/

https://istio.io/latest/docs/tasks/observability/distributed-tracing/mesh-and-proxy-config/#customizing-trace-sampling

Read more ...

ISTIO: Cleanup resources

Cleanup the resources:
Remove any kubectl port-forward processes that may be running:
killall kubectl

Cleanup the addons tools and istio-system namespace:
kubectl delete -f samples/addons
istioctl manifest generate --set profile=demo | kubectl delete --ignore-not-found=true -f -
istioctl tag remove default
kubectl delete namespace istio-system
kubectl label namespace default istio-injection-

Cleanup bookinfo:
samples/bookinfo/platform/kube/cleanup.sh
kubectl get virtualservices   #-- there should be no virtual services
kubectl get destinationrules  #-- there should be no destination rules
kubectl get gateway           #-- there should be no gateway
kubectl get pods              #-- the Bookinfo pods should be deleted

Reference:

 


Read more ...

My Favorite Site's List

#update below script more than 500 posts