istio实现熔断功能
熔断的目的是在出现故障或异常情况时,对服务进行自动的限流和隔离,以保护整个系统的稳定性和可用性。
上传httpbin镜像和fortio镜像到harbor
docker tag kong/httpbin:latest 172.16.80.140/istio/httpbin
docker push 172.16.80.140/istio/httpbin:latest
docker tag fortio/fortio:latest_release 172.16.80.140/istio/fortio:latest_release
docker push 172.16.80.140/istio/fortio:latest_release
在samples/httpbin下面,修改httpbin.yaml中的镜像为harbor镜像
apiVersion: v1
kind: ServiceAccount
metadata:
name: httpbin
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
labels:
app: httpbin
service: httpbin
spec:
ports:
- name: http
port: 8000
targetPort: 80
selector:
app: httpbin
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
version: v1
template:
metadata:
labels:
app: httpbin
version: v1
spec:
serviceAccountName: httpbin
containers:
- image: 172.16.80.140/istio/httpbin:latest
imagePullPolicy: IfNotPresent
name: httpbin
ports:
- containerPort: 8080


将service httpbin改为nodeport


最低0.47元/天 解锁文章
807

被折叠的 条评论
为什么被折叠?



