Getting Started Istio

  1. Download the Istio release and configuration
  2. Install Istio
  3. Open the application to outside traffic

Download the Istio release and configuration‌

1. Download the lstio release

cd /Libarary

Go to the Istio release page to download the installation file for your OS, or download and extract the latest release automatically (Linux or macOS):

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

2. Move to the Istio package directory. For example, if the package is istio-1.9.2

cd istio-1.9.2

The installation directory contains:‌

  • Sample applications in samples/
  • The istioctl client binary in the bin/ directory.

3. Add the istioctl client to your path (Linux or MacOS)

vim ~/.bash_profile
export ISTIO="/Library/istio-1.9.2"
export PATH=$PATH:${ISTIO}/bin

Install Istio

  • For this installation, we use the demo configuration profile. It’s selected to have a good set of defaults for testing, but there are other profiles for production or performance testing. If your platform has a vendor-specific configuration profile, e.g., Openshift, use it in the following command, instead of the demo profile. Refer to your platform instructions for details.
istioctl install --set profile=demo -y
# ✔ Istio core installed                                                          
# ✔ Istiod installed                                                              
# ✔ Egress gateways installed                                                     
# ✔ Ingress gateways installed                                                    
# ✔ Installation complete 
  • Add a namespace label to instruct Istio to automatically inject Envoy sidecar proxies when you deploy your application later:exit:
kubectl label namespace default istio-injection=enabled
# namespace/default labeled

Deploy the sample application

cd /Library/istio-1.9.2
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml

2. Check the applications‌

kubectl get services
kubectl get pods

3. Verify the application

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>" 
# <title>Simple Bookstore App</title>

Open the application to outside traffic

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

Verify external access

If you are using Minikube with named dev –driver=hyperkit

minikube ip -p prod
192.168.64.24
 k get svc --all-namespaces
# NAMESPACE      NAME                   TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                                      AGE
# istio-system   istio-ingressgateway   LoadBalancer   10.110.34.194    <pending>     15021:31854/TCP,80:30174/TCP,443:31864/TCP,31400:32633/TCP,15443:31376/TCP   3h10m
  • 80: 30174
  • 443: 31864
  • etc
curl 192.168.64.24:30174/productpage

Leave a Reply

Your email address will not be published.

ANOTE.DEV