🕸️
Container Platform

Istio

Service mesh for traffic, security, and observability

🐧 Linux🍎 Mac🪟 Windows
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

What is this?

Istio adds secure networking, traffic control, and monitoring between microservices.

📥

Step 01

Install Istio

(01)Install Istio

Linux
1curl -L https://istio.io/downloadIstio | sh -
2cd istio-*
3export PATH=$PWD/bin:$PATH
4istioctl install --set profile=demo -y
⚙️

Step 02

Configure Istio

(01)Configure Istio

Linux
1kubectl label namespace default istio-injection=enabled
2kubectl get pods -n istio-system

Step 03

Verify

(01)Verify installation

Linux
1istioctl verify-install
2kubectl get svc -n istio-system
🔧

Step 04

Common Problems

#1Sidecar not injected / 503 errors

Linux
1kubectl label namespace default istio-injection=enabled --overwrite
2istioctl analyze
3kubectl get pods -o jsonpath='{.items[*].spec.containers[*].name}'

📋Config templates

2 YAML templates for Istio. Copy and deploy after setup.

2 ready-to-copy templates. Expand one, copy the YAML, then run the deploy commands.

Ingress.yml

yaml
1apiVersion: networking.k8s.io/v1
2kind: Ingress
3metadata:
4 name: minimal-ingress
5 annotations:
6 nginx.ingress.kubernetes.io/rewrite-target: /
7spec:
8 rules:
9 - http:
10 paths:
11 - path: /testpath
12 pathType: Prefix
13 backend:
14 service:
15 name: test
16 port:
17 number: 80
📄

Step 01

Deploy Ingress

(01)Install NGINX Ingress Controller

Linux
1kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.11.1/deploy/static/provider/cloud/deploy.yaml
2kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=120s

(02)Apply Ingress resource

Linux
1kubectl apply -f Ingress.yml
2kubectl get ingress
3kubectl describe ingress minimal-ingress