# 安装
# 下载
https://github.com/istio/istio/releases/download/1.13.2/istio-1.13.2-linux-amd64.tar.gz
tar -xvf istio-1.13.2-linux-amd64.tar.gz
cp /root/istio-1.13.2/bin/istioctl /usr/local/bin/
istioctl version
istioctl operator init
vim default-install.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: istio-system
name: istio-operator
spec:
profile: default
components:
ingressGateways:
- name: istio-ingressgateway
enabled: true
k8s:
resources:
requests:
cpu: 200m
serviceAnnotations:
cloud.google.com/load-balancer-type: "internal"
service:
type: NodePort
ports:
- port: 15020
nodePort: 30520
name: status-port
- port: 80
targetPort: 8080
nodePort: 30080
name: http2
- port: 443
nodePort: 30443
targetPort: 8443
name: https
istioctl manifest apply -f default-install.yaml
# 安装kiali
cd /root/istio-1.13.2/samples/addons
kubectl apply -f kiali.yaml
# ingress配置
kubectl create secret tls test-secret --cert=www.test.com.crt --key=www.test.com.key -n istio-system
vim kiali-ingress-https.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: kiali
namespace: istio-system
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
tls:
- hosts:
- kiali.test.com
secretName: test-secret
rules:
- host: kiali.test.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: kiali
port:
name: http
kubectl apply -f kiali-ingress-https.yaml -n istio-system
# 安装jaeger
cd /root/istio-1.13.2/samples/addons
kubectl apply -f jaeger.yaml
# 安装prometheus,grafana
cd /root/istio-1.13.2/samples/addons
kubectl apply -f prometheus.yaml
kubectl apply -f grafana.yaml
# 部署演示项目bookinfo
kubectl create ns bookinfo
kubectl label ns bookinfo istio-injection=enabled
cd /root/istio-1.13.2/samples/bookinfo/platform/kube
kubectl apply -f bookinfo.yaml -n bookinfo
# ingress gateway
#
vim bookinfo-gateway.yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: bookinfo-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: "test-secret"
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: bookinfo
spec:
hosts:
- "bookinfo.test.com"
gateways:
- bookinfo-gateway
http:
- match:
- uri:
exact: /productpage
- uri:
prefix: /static
- uri:
exact: /login
- uri:
exact: /logout
- uri:
prefix: /api/v1/products
route:
- destination:
host: productpage
port:
number: 9080
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。