istio 安装 gateway,vs 配置

环境要求: k8s集群

实现:

安装istio 1.8.1版本

Wget https://github.com/istio/istio/releases/tag/1.8.1下载istio-1.8.1-linux-amd64.tar.gz,并解压,然后进入解压后的istio-1.8.1目录

bin/目录下的istioctl文件,cp到可执行的PATH路径,就可以使用istioctl命令了

istioctl install --set profile=demo

Kubectl  get pod -n istio-system

kubectl label  ns default istio-injection=enabled   default空间启用istio

 

vim dev-gw.yaml

 

apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: blackboard-gw
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- blackboard.para.com
port:
name: http
number: 80
protocol: HTTP

vim dev-vs.yaml

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
generation: 1
name: blackboard-vs
spec:
gateways:
- blackboard-gw
hosts:
- blackboard.para.com
http:
- match:
- uri:
prefix: /
route:
- destination:
host: blackboard-dev-zh-cn
weight: 100

vim nginx.conf

 

posted @   zyl88  阅读(134)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示