一、部署
#下载
https://github.com/istio/istio/releases/download/1.28.2/istio-1.28.2-linux-amd64.tar.gz
#解压
tar -zxvf istio-1.28.2-linux-amd64.tar.gz
#部署
root@k8s-01:/woke/istio# ls
istio-1.28.2 istio-1.28.2-linux-amd64.tar.gz
root@k8s-01:/woke/istio# cd istio-1.28.2/
root@k8s-01:/woke/istio/istio-1.28.2# export PATH=$PWD/bin:$PATH
root@k8s-01:/woke/istio/istio-1.28.2# istioctl install -f samples/bookinfo/demo-profile-no-gateways.yaml -y
|\
| \
| \
| \
/|| \
/ || \
/ || \
/ || \
/ || \
/ || \
/______||__________\
____________________
\__ _____/
\_____/
✔ Istio core installed ⛵️
Processing resources for Istiod. Waiting for Deployment/istio-system/istiod
✔ Istiod installed 🧠
✔ Installation complete
root@k8s-01:/woke/istio/istio-1.28.2# kubectl label namespace default istio-injection=enabled
namespace/default labeled
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get crd gateways.gateway.networking.k8s.io
NAME CREATED AT
gateways.gateway.networking.k8s.io 2025-11-17T15:05:26Z
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get crd httproutes.gateway.networking.k8s.io
NAME CREATED AT
httproutes.gateway.networking.k8s.io 2025-11-17T15:05:26Z
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get crd gatewayclasses.gateway.networking.k8s.io
NAME CREATED AT
gatewayclasses.gateway.networking.k8s.io 2025-11-17T15:05:26Z
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get crd | egrep 'tlsroutes|tcproutes|udproutes|grpcroutes\.gateway\.networking\.k8s\.io'
grpcroutes.gateway.networking.k8s.io 2025-11-17T15:05:26Z
root@k8s-01:/woke/istio/istio-1.28.2# 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>
root@k8s-01:/woke/istio/istio-1.28.2# kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
gateway.networking.istio.io/bookinfo-gateway created
virtualservice.networking.istio.io/bookinfo created
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get gateway
NAME CLASS ADDRESS PROGRAMMED AGE
traefik-gw traefik True 25d
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get gateway
NAME CLASS ADDRESS PROGRAMMED AGE
traefik-gw traefik True 25d
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get pod -A | grep gateway
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get gateways.networking.istio.io -A
kubectl get virtualservices.networking.istio.io -A
NAMESPACE NAME AGE
default bookinfo-gateway 2m55s
NAMESPACE NAME GATEWAYS HOSTS AGE
default bookinfo ["bookinfo-gateway"] ["*"] 2m55s
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get svc -n istio-system | egrep 'ingress|gateway'
kubectl get pods -n istio-system | egrep 'ingress|gateway'
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2# istioctl install -y --set profile=demo
istioctl: command not found
root@k8s-01:/woke/istio/istio-1.28.2# ls
bin LICENSE manifests manifest.yaml README.md samples tools
root@k8s-01:/woke/istio/istio-1.28.2# export PATH=$PWD/bin:$PATH
istioctl version
client version: 1.28.2
control plane version: 1.28.2
data plane version: 1.28.2 (6 proxies)
root@k8s-01:/woke/istio/istio-1.28.2# istioctl install -y --set profile=demo
|\
| \
| \
| \
/|| \
/ || \
/ || \
/ || \
/ || \
/ || \
/______||__________\
____________________
\__ _____/
\_____/
✔ Istio core installed ⛵️
✔ Istiod installed 🧠
✔ Egress gateways installed 🛫
✔ Ingress gateways installed 🛬
✔ Installation complete
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2#
root@k8s-01:/woke/istio/istio-1.28.2# kubectl get pods -n istio-system | egrep 'istio-ingressgateway|istiod'
kubectl get svc -n istio-system | egrep 'istio-ingressgateway'
istio-ingressgateway-796f5cf647-n28c8 1/1 Running 0 107s
istiod-5c84f8c79d-q7p2x 1/1 Running 0 91m
istio-ingressgateway LoadBalancer 10.99.189.246 <pending> 15021:31689/TCP,80:32241/TCP,443:30394/TCP,31400:31664/TCP,15443:32466/TCP 107s
#调通
root@k8s-01:/woke/istio/istio-1.28.2# kubectl port-forward -n istio-system svc/istio-ingressgateway 8080:80
Forwarding from 127.0.0.1:8080 -> 8080
Forwarding from [::1]:8080 -> 8080
Handling connection for 8080
#访问
root@k8s-01:/woke/istio/istio-1.28.2# curl -sS http://127.0.0.1:8080/productpage | grep -o "<title>.*</title>"
<title>Simple Bookstore App</title>
评论 (0)