{"action":"created","issue":{"url":"https://api.github.com/repos/opsnull/follow-me-install-kubernetes-cluster/issues/187","repository_url":"https://api.github.com/repos/opsnull/follow-me-install-kubernetes-cluster","labels_url":"https://api.github.com/repos/opsnull/follow-me-install-kubernetes-cluster/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/opsnull/follow-me-install-kubernetes-cluster/issues/187/comments","events_url":"https://api.github.com/repos/opsnull/follow-me-install-kubernetes-cluster/issues/187/events","html_url":"https://github.com/opsnull/follow-me-install-kubernetes-cluster/issues/187","id":280800859,"node_id":"MDU6SXNzdWUyODA4MDA4NTk=","number":187,"title":"各节点上部署完 Flannel后, subnets都是同一网段","user":{"login":"luokeychen","id":2275865,"node_id":"MDQ6VXNlcjIyNzU4NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/2275865?v=4","gravatar_id":"","url":"https://api.github.com/users/luokeychen","html_url":"https://github.com/luokeychen","followers_url":"https://api.github.com/users/luokeychen/followers","following_url":"https://api.github.com/users/luokeychen/following{/other_user}","gists_url":"https://api.github.com/users/luokeychen/gists{/gist_id}","starred_url":"https://api.github.com/users/luokeychen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luokeychen/subscriptions","organizations_url":"https://api.github.com/users/luokeychen/orgs","repos_url":"https://api.github.com/users/luokeychen/repos","events_url":"https://api.github.com/users/luokeychen/events{/privacy}","received_events_url":"https://api.github.com/users/luokeychen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-12-10T11:08:26Z","updated_at":"2018-12-10T13:48:24Z","closed_at":"2017-12-12T06:30:29Z","author_association":"NONE","body":"OS ubuntu16.0.4\r\n按照教程做了一个下午。有几个问题想请教一下。\r\n按照：【部署 Flannel 网络】\r\n 一步一步做了一下\r\n\r\n```bash\r\n10:44:20-root@kube-node3:~/ssl$ /root/local/bin/etcdctl \\\r\n>   --endpoints=${ETCD_ENDPOINTS} \\\r\n>   --ca-file=/etc/kubernetes/ssl/ca.pem \\\r\n>   --cert-file=/etc/flanneld/ssl/flanneld.pem \\\r\n>   --key-file=/etc/flanneld/ssl/flanneld-key.pem \\\r\n>   get ${FLANNEL_ETCD_PREFIX}/config\r\n2017-12-10 10:51:56.066284 I | warning: ignoring ServerName for user-provided CA for backwards compatibility is deprecated\r\n{\"Network\":\"172.30.0.0/16\", \"SubnetLen\": 24, \"Backend\": {\"Type\": \"vxlan\"}}\r\n10:51:56-root@kube-node3:~/ssl$ /root/local/bin/etcdctl \\\r\n>   --endpoints=${ETCD_ENDPOINTS} \\\r\n>   --ca-file=/etc/kubernetes/ssl/ca.pem \\\r\n>   --cert-file=/etc/flanneld/ssl/flanneld.pem \\\r\n>   --key-file=/etc/flanneld/ssl/flanneld-key.pem \\\r\n>   ls ${FLANNEL_ETCD_PREFIX}/subnets\r\n2017-12-10 10:52:02.034928 I | warning: ignoring ServerName for user-provided CA for backwards compatibility is deprecated\r\n/kubernetes/network/subnets/172.30.40.0-24\r\n10:52:02-root@kube-node3:~/ssl$ /root/local/bin/etcdctl \\\r\n>   --endpoints=${ETCD_ENDPOINTS} \\\r\n>   --ca-file=/etc/kubernetes/ssl/ca.pem \\\r\n>   --cert-file=/etc/flanneld/ssl/flanneld.pem \\\r\n>   --key-file=/etc/flanneld/ssl/flanneld-key.pem \\\r\n>   get ${FLANNEL_ETCD_PREFIX}/subnets/172.30.40.0-24\r\n2017-12-10 10:52:12.726041 I | warning: ignoring ServerName for user-provided CA for backwards compatibility is deprecated\r\n{\"PublicIP\":\"10.0.2.15\",\"BackendType\":\"vxlan\",\"BackendData\":{\"VtepMAC\":\"da:43:ff:b7:55:8c\"}}\r\n10:52:12-root@kube-node3:~/ssl$\r\n```\r\n配置每个NODE都做了一遍，\r\n在各节点上部署完 Flannel 后，查看已分配的 Pod 子网段列表\r\n```bash\r\n10:52:12-root@kube-node3:~/ssl$ /root/local/bin/etcdctl \\\r\n>   --endpoints=${ETCD_ENDPOINTS} \\\r\n>   --ca-file=/etc/kubernetes/ssl/ca.pem \\\r\n>   --cert-file=/etc/flanneld/ssl/flanneld.pem \\\r\n>   --key-file=/etc/flanneld/ssl/flanneld-key.pem \\\r\n>   ls ${FLANNEL_ETCD_PREFIX}/subnets\r\n2017-12-10 10:53:31.619053 I | warning: ignoring ServerName for user-provided CA for backwards compatibility is deprecated\r\n/kubernetes/network/subnets/172.30.40.0-24\r\n```\r\n只有一个\r\n`/kubernetes/network/subnets/172.30.40.0-24`\r\n并没有出现3个网段\r\n然后查了一下每个Node生成的参数，发觉都一样\r\n## NODE1\r\n```\r\n10:34:54-root@kube-node1:~/ssl$ cat /run/flannel/docker\r\nDOCKER_OPT_BIP=\"--bip=172.30.40.1/24\"\r\nDOCKER_OPT_IPMASQ=\"--ip-masq=true\"\r\nDOCKER_OPT_MTU=\"--mtu=1450\"\r\nDOCKER_NETWORK_OPTIONS=\" --bip=172.30.40.1/24 --ip-masq=true --mtu=1450\"\r\n10:56:50-root@kube-node1:~/ssl$ cat /run/flannel/subnet.env\r\nFLANNEL_NETWORK=172.30.0.0/16\r\nFLANNEL_SUBNET=172.30.40.1/24\r\nFLANNEL_MTU=1450\r\nFLANNEL_IPMASQ=false\r\n10:56:58-root@kube-node1:~/ssl$\r\n```\r\n## NODE2\r\n```bash\r\n10:34:53-root@kube-node2:/run/flannel$ cat /run/flannel/docker\r\nDOCKER_OPT_BIP=\"--bip=172.30.40.1/24\"\r\nDOCKER_OPT_IPMASQ=\"--ip-masq=true\"\r\nDOCKER_OPT_MTU=\"--mtu=1450\"\r\nDOCKER_NETWORK_OPTIONS=\" --bip=172.30.40.1/24 --ip-masq=true --mtu=1450\"\r\n10:56:52-root@kube-node2:/run/flannel$ cat /run/flannel/subnet.env\r\nFLANNEL_NETWORK=172.30.0.0/16\r\nFLANNEL_SUBNET=172.30.40.1/24\r\nFLANNEL_MTU=1450\r\nFLANNEL_IPMASQ=false\r\n10:56:59-root@kube-node2:/run/flannel$\r\n```\r\n## NODE3\r\n```bash\r\n10:53:31-root@kube-node3:~/ssl$ cat /run/flannel/docker\r\nDOCKER_OPT_BIP=\"--bip=172.30.40.1/24\"\r\nDOCKER_OPT_IPMASQ=\"--ip-masq=true\"\r\nDOCKER_OPT_MTU=\"--mtu=1450\"\r\nDOCKER_NETWORK_OPTIONS=\" --bip=172.30.40.1/24 --ip-masq=true --mtu=1450\"\r\n10:56:25-root@kube-node3:~/ssl$ cat /run/flannel/subnet.env\r\nFLANNEL_NETWORK=172.30.0.0/16\r\nFLANNEL_SUBNET=172.30.40.1/24\r\nFLANNEL_MTU=1450\r\nFLANNEL_IPMASQ=false\r\n10:56:29-root@kube-node3:~/ssl$\r\n```\r\n按自己的理解每个NODE应该被分配到不同的网段。是应该这样吗？\r\n\r\n一开始没有注意到上面的问题然后一直设置到【部署 dashboard 插件】，\r\n然后在设置好代理【kubectl proxy】之后打开浏览器出现\r\n```\r\nError: 'dial tcp 172.30.40.2:9090: getsockopt: no route to host'\r\nTrying to reach: 'http://172.30.40.2:9090/'\r\n```\r\n查看了所有的issues，也没有得到解决。\r\n\r\n能否给予帮助谢谢"},"comment":{"url":"https://api.github.com/repos/opsnull/follow-me-install-kubernetes-cluster/issues/comments/445820805","html_url":"https://github.com/opsnull/follow-me-install-kubernetes-cluster/issues/187#issuecomment-445820805","issue_url":"https://api.github.com/repos/opsnull/follow-me-install-kubernetes-cluster/issues/187","id":445820805,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTgyMDgwNQ==","user":{"login":"akillcool","id":9277617,"node_id":"MDQ6VXNlcjkyNzc2MTc=","avatar_url":"https://avatars0.githubusercontent.com/u/9277617?v=4","gravatar_id":"","url":"https://api.github.com/users/akillcool","html_url":"https://github.com/akillcool","followers_url":"https://api.github.com/users/akillcool/followers","following_url":"https://api.github.com/users/akillcool/following{/other_user}","gists_url":"https://api.github.com/users/akillcool/gists{/gist_id}","starred_url":"https://api.github.com/users/akillcool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akillcool/subscriptions","organizations_url":"https://api.github.com/users/akillcool/orgs","repos_url":"https://api.github.com/users/akillcool/repos","events_url":"https://api.github.com/users/akillcool/events{/privacy}","received_events_url":"https://api.github.com/users/akillcool/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T13:48:24Z","updated_at":"2018-12-10T13:48:24Z","author_association":"NONE","body":"@hy05190134 解决这个问题了，iface要设置为eth1之外，重启服务需要删除/run/flannel/subnet.env这个flannel生成的缓存文件\r\n\r\nrefer to https://www.yungeio.com/articles/13"}}
{"actor":{"display_login":"akillcool"}}