flannel 1.2.0 configuration ans option



0. 前言

官方文档链接

1. flannel 服务启动的主要 option

子网租赁默认是24小时,默认一小时renew一次这个时间

option也可以写成环境变量,默认规则就是将option大写,前面加上FLANNELD_,例如--etcd-endpoints=http://10.0.0.2:2379等同于FLANNELD_ETCD_ENDPOINTS=http://10.0.0.2:2379

flannel提供健康检查http端点healthz。 目前,当flannel运行时,这个端点将返回http状态ok(即200)。 这个功能默认是禁用的。 将healthz-port设置为非零值将启用flannel的healthz服务器。

2. flannel 网络配置

Network (string): IPv4 network in CIDR format to use for the entire flannel network. (This is the only mandatory key.)

SubnetLen (integer): The size of the subnet allocated to each host. Defaults to 24 (i.e. /24) unless Network was configured to be smaller than a /24 in which case it is one less than the network.

SubnetMin (string): The beginning of IP range which the subnet allocation should start with. Defaults to the first subnet of Network.

SubnetMax (string): The end of the IP range at which the subnet allocation should end with. Defaults to the last subnet of Network.

Backend (dictionary): Type of backend to use and specific configurations for that backend. The list of available backends and the keys that can be put into the this dictionary are listed below. Defaults to udp backend.

例子

{
	"Network": "10.0.0.0/8",
	"SubnetLen": 20,
	"SubnetMin": "10.10.0.0",
	"SubnetMax": "10.99.0.0",
	"Backend": {
		"Type": "udp",
		"Port": 7890
	}
}