博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Kubernetes 自动加入Consul
阅读量:6118 次
发布时间:2019-06-21

本文共 2319 字,大约阅读时间需要 7 分钟。

SEP 19 2018 MITCHELL HASHIMOTO

We're releasing  features every week.

This week we're showcasing the auto-join feature to enable nodes running inside and outside of Kubernetes to join a Consul cluster running on Kubernetes. Rather than joining with a static IP address or DNS entry, the auto-join feature uses the Kubernetes API to discover pods running Consul agents and joins those pods.

Video

To learn more about the Kubernetes auto-join provider for Consul, watch the video below or scroll down to read more. The video below shows a non-Kubernetes node automatically joining a Consul cluster running within Kubernetes.

Auto-join for Kubernetes

Auto-join is a feature that enables Consul to use cloud or platform APIs for finding other Consul agents to join. This solves the problem of having to know the IP address of the initial set of agents to join a cluster. In the case of cloud APIs, hosts can often be tagged with specific values that Consul can use to filter hosts to find running Consul agents.

The Kubernetes auto-join provider uses the Kubernetes API to discover pods running Consul agents that can be joined. This feature can be used by agents both inside and outside of Kubernetes, but is particularly useful for agents running outside of Kubernetes because they cannot use standard Kubernetes service discovery to find the pods.

$ consul agent -retry-join 'provider=k8s label_selector="app=consul,component=server"'

The -retry-join flag above will cause the agent to query Kubernetes for pods labeled with app=consul,component=server and attempt to join those pods using the pod or host IP. If no pods are found, Consul will retry periodically.

Consul authenticates with Kubernetes using a standard kubeconfig file used for authenticating with kubectl. It automatically searches standard locations for this file. This allows the Kubernetes auto-join feature to work with all major hosted Kubernetes offerings.

The Kubernetes auto-join provider supports many configuration options. See the full reference documentation of  for more information.

Next

The Kubernetes auto-join provider is available in Consul 1.2.3 and later. To learn more, see the .

We have more exciting Consul + Kubernetes integrations being released in the coming weeks. Please  to learn more.

转载于:https://blog.51cto.com/13883466/2178854

你可能感兴趣的文章
Android Jni调用浅述
查看>>
CodeCombat森林关卡Python代码
查看>>
第一个应用程序HelloWorld
查看>>
(二)Spring Boot 起步入门(翻译自Spring Boot官方教程文档)1.5.9.RELEASE
查看>>
Android Annotation扫盲笔记
查看>>
React 整洁代码最佳实践
查看>>
聊聊架构设计做些什么来谈如何成为架构师
查看>>
Java并发编程73道面试题及答案
查看>>
移动端架构的几点思考
查看>>
Tomcat与Spring中的事件机制详解
查看>>
Spark综合使用及用户行为案例区域内热门商品统计分析实战-Spark商业应用实战...
查看>>
初学者自学前端须知
查看>>
Retrofit 源码剖析-深入
查看>>
企业级负载平衡简介(转)
查看>>
ICCV2017 论文浏览记录
查看>>
科技巨头的交通争夺战
查看>>
当中兴安卓手机遇上农行音频通用K宝 -- 卡在“正在通讯”,一直加载中
查看>>
Shell基础之-正则表达式
查看>>
JavaScript异步之Generator、async、await
查看>>
讲讲吸顶效果与react-sticky
查看>>