首页 > 其他 > 详细

k8s istio 配置域名转发到外部节点机器上

时间:2020-06-14 17:05:31      阅读:186      评论:0      收藏:0      [点我收藏+]

关键字:k8s istio endpoint svc vs

1、创建VS

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: vs-luntan
  namespace: qa
spec:
  gateways:
  -gateway-qa11
  hosts:
  - luntan.qa.com
  http:
  - match:
    - uri:
        prefix: /
    route:
    - destination:
        host: svc-luntan.qa.svc.cluster.local 

2、创建svc

apiVersion: v1
kind: Service
metadata:
  name: svc-luntan
  namespace: qa
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {} 

3、创建endpoint

apiVersion: v1
kind: Endpoints
metadata:
  name: svc-luntan
  namespace: qa
subsets:
- addresses:
  - ip: 10.198.1.1
  ports:
  - port: 80
    protocol: TCP 

 

k8s istio 配置域名转发到外部节点机器上

原文:https://www.cnblogs.com/already/p/13125322.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!