如将 以下3个IP的外部elasticsearch做成service名称,提供给pod内应用配置文件使用
- ip: 192.168.12.200
- ip: 192.168.12.201
- ip: 192.168.12.202
apiVersion: v1
kind: Endpoints
metadata:
name: external-elasticsearch
namespace: default
subsets:
- addresses:
- ip: 192.168.12.200
- ip: 192.168.12.201
- ip: 192.168.12.202
ports:
- port: 9200
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: external-cms-elasticsearch
namespace: default
spec:
clusterIP: None
ports:
- port: 9200
protocol: TCP
targetPort: 9200
文章评论