elasticsearch Kubernetes:在VPN内部公开服务
我已经使用kops创建了kubernetes集群elasticsearch Kubernetes:在VPN内部公开服务,elasticsearch,kubernetes,kibana,kops,elasticsearch,Kubernetes,Kibana,Kops,我已经使用kops创建了kubernetes集群 kops create cluster \ --dns-zone=vpc.abc.in \ --master-zones=ap-southeast-1a,ap-southeast-1b,ap-southeast-1c \ --zones=ap-southeast-1a,ap-southeast-1b,ap-southeast-1c \ --node-count 3 \ --topology private
kops create cluster \
--dns-zone=vpc.abc.in \
--master-zones=ap-southeast-1a,ap-southeast-1b,ap-southeast-1c \
--zones=ap-southeast-1a,ap-southeast-1b,ap-southeast-1c \
--node-count 3 \
--topology private \
--networking flannel-vxlan \
--node-size=t2.medium \
--master-size=t2.micro \
${NAME}
我正在使用私有拓扑和内部负载均衡器
每当我创建类型为=LoadBalancer的服务时,它都会创建一个面向公共的ELB,并且url可以公开访问
我想部署弹性搜索和kibana,使其仅在VPN内可用。我们已经有了VPN设置
如何在VPN中访问服务?在服务定义中添加以下注释:
service.beta.kubernetes.io/aws-load-balancer-internal: '"true"'
完整示例:
kind: Service
apiVersion: v1
metadata:
name: my-service
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: '"true"'
spec:
selector:
app: MyApp
ports:
- protocol: TCP
port: 80
targetPort: 9376
type: LoadBalancer
这将提供一个内部ELB,而不是外部ELB。我确实尝试过这一点,它起了作用。。。这将为服务创建内部负载平衡器。。。谢谢