{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/docs/pulls/comments/206530491","pull_request_review_id":141957814,"id":206530491,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjUzMDQ5MQ==","diff_hunk":"@@ -0,0 +1,156 @@\n+---\n+title: CNI providers\n+weight: 2300\n+draft: true\n+---\n+\n+--- \n+\n+### What is CNI?\n+\n+CNI (Container Network Interface), a [Cloud Native Computing Foundation project](https://cncf.io/), consists of a specification and libraries for writing plugins to configure network interfaces in Linux containers, along with a number of supported plugins. CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted.\n+\n+K8S uses CNI as an interface between network providers and k8s pods networking.\n+\n+<img src=\"img/cni-logo.png\" alt=\"CNI logo\">\n+\n+For more information visit [CNI GitHub project](https://github.com/containernetworking/cni). \n+\n+\n+### What is CNI network model?\n+\n+Basically, CNI providers offer 2 kinds of network model depending on architecture:\n+\n+#### What is encapsulated network?\n+\n+This kind of network model generates an overlay layer 2 network encapsulated over layer 3 network (k8s cluster workers). With this model you have an isolated layer 2 network for containers without needed routing distribution, at the cost of an little overhead in terms of processing and increasing ip package size with an ip header generated by overlay encapsulation. Encapsulation information is used to be distributed by udp port between k8s workers, interchanging network control plane information about how mac addressed could be reached. Common encapsulation used in this kind of network model are vxlan, ipsec, ip-in-ip...\n+\n+Simplifying, this network model generates a kind of network bridge extended between k8s workers, where pods will be connected.\n+\n+This network model is indeed when a extended layer 2 bridge is preferred. This network model is sensible to layer 3 network latencies of the k8s workers. If datacenters are in distinct geo-locations, be sure to have low latencies between them to avoid eventual network segmentation. \n+\n+CNI providers using this network model, flannel, canal, weave...\n+\n+<img src=\"img/encapsulated-network.svg\" alt=\"Encapsulated network\">\n+\n+#### What is unencapsulated network? \n+\n+This kind of CNI provider uses layer 3 network to route packets between containers. This model doesn't generate an isolated layer 2 network, neither generates overhead, at the cost of route distribution needed, that is managed by k8s workers. Instead of ip headers to encapsutate, it uses a bgp domain between k8s workers to distribute routing information. \n+\n+Simplifying, this network model generates a kind of network router extended between k8s workers, that provides information how to reach pods.\n+\n+This network model is indeed when a routed layer 3 network is preferred. This mode dinamically update routes at os level at k8s workers. It's less sensible to latency but \n+\n+CNI providers using this network model, calico, romana...\n+\n+<img src=\"img/unencapsulated-network.svg\" alt=\"Unencapsulated network\">\n+\n+### What CNI provides Rancher?\n+\n+Rancher supports three different CNI providers for k8s clusters. They could be choosed when you create new k8s cluster from Rancher. \n+\n+#### What is canal?\n+\n+<img src=\"img/canal-logo.png\" alt=\"Canal logo\">\n+\n+Canal is a CNI provider that gives you the best of Flannel and Calico. It allows users to easily deploy Calico and flannel networking together as a unified networking solution, combining Calico’s network policy enforcement with the rich superset of Calico (unencapsulated) and/or flannel (encapsulated) network connectivity options. \n+\n+On Rancher, canal is the default CNI provider combined with flannel and vxlan encapsulation. \n+\n+K8S workers should open udp port 8472 (vxlan) and 9099 (healthcheck)\n+\n+<img src=\"img/canal-diagram.png\" alt=\"Canal diagram\">\n+\n+More info:\n+https://github.com/projectcalico/canal\n+\n+\n+#### What is flannel?\n+\n+<img src=\"img/flannel-logo.png\" alt=\"Flannel logo\">\n+\n+Flannel is a simple and easy way to configure a layer 3 network fabric designed for Kubernetes. Flannel runs a single binary agent called flanneld on each host, that is responsible for allocating a subnet lease to each host out of a larger, preconfigured address space. Flannel uses either the Kubernetes API or etcd directly to store the network configuration, the allocated subnets, and any auxiliary data (such as the host's public IP). Packets are forwarded using one of several backend mechanisms, being the default encapsulation `vxlan`.\n+","path":"content/rancher/v2.x/en/faq/network/cni-providers/_index.md","position":73,"original_position":73,"commit_id":"7896ff16d0c16ca1c58188eb55144e7f6241e245","original_commit_id":"7896ff16d0c16ca1c58188eb55144e7f6241e245","user":{"login":"rawmind0","id":11555446,"node_id":"MDQ6VXNlcjExNTU1NDQ2","avatar_url":"https://avatars1.githubusercontent.com/u/11555446?v=4","gravatar_id":"","url":"https://api.github.com/users/rawmind0","html_url":"https://github.com/rawmind0","followers_url":"https://api.github.com/users/rawmind0/followers","following_url":"https://api.github.com/users/rawmind0/following{/other_user}","gists_url":"https://api.github.com/users/rawmind0/gists{/gist_id}","starred_url":"https://api.github.com/users/rawmind0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawmind0/subscriptions","organizations_url":"https://api.github.com/users/rawmind0/orgs","repos_url":"https://api.github.com/users/rawmind0/repos","events_url":"https://api.github.com/users/rawmind0/events{/privacy}","received_events_url":"https://api.github.com/users/rawmind0/received_events","type":"User","site_admin":false},"body":"Good point, ok...","created_at":"2018-07-31T13:38:13Z","updated_at":"2018-07-31T13:38:13Z","html_url":"https://github.com/rancher/docs/pull/545#discussion_r206530491","pull_request_url":"https://api.github.com/repos/rancher/docs/pulls/545","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rancher/docs/pulls/comments/206530491"},"html":{"href":"https://github.com/rancher/docs/pull/545#discussion_r206530491"},"pull_request":{"href":"https://api.github.com/repos/rancher/docs/pulls/545"}},"in_reply_to_id":206518572},"pull_request":{"url":"https://api.github.com/repos/rancher/docs/pulls/545","id":204453908,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NDUzOTA4","html_url":"https://github.com/rancher/docs/pull/545","diff_url":"https://github.com/rancher/docs/pull/545.diff","patch_url":"https://github.com/rancher/docs/pull/545.patch","issue_url":"https://api.github.com/repos/rancher/docs/issues/545","number":545,"state":"open","locked":false,"title":"FAQ guide for network CNI providers","user":{"login":"rawmind0","id":11555446,"node_id":"MDQ6VXNlcjExNTU1NDQ2","avatar_url":"https://avatars1.githubusercontent.com/u/11555446?v=4","gravatar_id":"","url":"https://api.github.com/users/rawmind0","html_url":"https://github.com/rawmind0","followers_url":"https://api.github.com/users/rawmind0/followers","following_url":"https://api.github.com/users/rawmind0/following{/other_user}","gists_url":"https://api.github.com/users/rawmind0/gists{/gist_id}","starred_url":"https://api.github.com/users/rawmind0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawmind0/subscriptions","organizations_url":"https://api.github.com/users/rawmind0/orgs","repos_url":"https://api.github.com/users/rawmind0/repos","events_url":"https://api.github.com/users/rawmind0/events{/privacy}","received_events_url":"https://api.github.com/users/rawmind0/received_events","type":"User","site_admin":false},"body":"FAQ guide for CNI providers on Rancher v2","created_at":"2018-07-27T14:47:52Z","updated_at":"2018-07-31T13:38:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4b759ed69b90a2c259b33c60b7a2ccb46257c0a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"JasonvanBrackel","id":942110,"node_id":"MDQ6VXNlcjk0MjExMA==","avatar_url":"https://avatars1.githubusercontent.com/u/942110?v=4","gravatar_id":"","url":"https://api.github.com/users/JasonvanBrackel","html_url":"https://github.com/JasonvanBrackel","followers_url":"https://api.github.com/users/JasonvanBrackel/followers","following_url":"https://api.github.com/users/JasonvanBrackel/following{/other_user}","gists_url":"https://api.github.com/users/JasonvanBrackel/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonvanBrackel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonvanBrackel/subscriptions","organizations_url":"https://api.github.com/users/JasonvanBrackel/orgs","repos_url":"https://api.github.com/users/JasonvanBrackel/repos","events_url":"https://api.github.com/users/JasonvanBrackel/events{/privacy}","received_events_url":"https://api.github.com/users/JasonvanBrackel/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rancher/docs/pulls/545/commits","review_comments_url":"https://api.github.com/repos/rancher/docs/pulls/545/comments","review_comment_url":"https://api.github.com/repos/rancher/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/docs/issues/545/comments","statuses_url":"https://api.github.com/repos/rancher/docs/statuses/7896ff16d0c16ca1c58188eb55144e7f6241e245","head":{"label":"rawmind0:cni","ref":"cni","sha":"7896ff16d0c16ca1c58188eb55144e7f6241e245","user":{"login":"rawmind0","id":11555446,"node_id":"MDQ6VXNlcjExNTU1NDQ2","avatar_url":"https://avatars1.githubusercontent.com/u/11555446?v=4","gravatar_id":"","url":"https://api.github.com/users/rawmind0","html_url":"https://github.com/rawmind0","followers_url":"https://api.github.com/users/rawmind0/followers","following_url":"https://api.github.com/users/rawmind0/following{/other_user}","gists_url":"https://api.github.com/users/rawmind0/gists{/gist_id}","starred_url":"https://api.github.com/users/rawmind0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawmind0/subscriptions","organizations_url":"https://api.github.com/users/rawmind0/orgs","repos_url":"https://api.github.com/users/rawmind0/repos","events_url":"https://api.github.com/users/rawmind0/events{/privacy}","received_events_url":"https://api.github.com/users/rawmind0/received_events","type":"User","site_admin":false},"repo":{"id":142585736,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI1ODU3MzY=","name":"docs","full_name":"rawmind0/docs","owner":{"login":"rawmind0","id":11555446,"node_id":"MDQ6VXNlcjExNTU1NDQ2","avatar_url":"https://avatars1.githubusercontent.com/u/11555446?v=4","gravatar_id":"","url":"https://api.github.com/users/rawmind0","html_url":"https://github.com/rawmind0","followers_url":"https://api.github.com/users/rawmind0/followers","following_url":"https://api.github.com/users/rawmind0/following{/other_user}","gists_url":"https://api.github.com/users/rawmind0/gists{/gist_id}","starred_url":"https://api.github.com/users/rawmind0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rawmind0/subscriptions","organizations_url":"https://api.github.com/users/rawmind0/orgs","repos_url":"https://api.github.com/users/rawmind0/repos","events_url":"https://api.github.com/users/rawmind0/events{/privacy}","received_events_url":"https://api.github.com/users/rawmind0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rawmind0/docs","description":"Documentation for Rancher products (for 2.0/new site)","fork":true,"url":"https://api.github.com/repos/rawmind0/docs","forks_url":"https://api.github.com/repos/rawmind0/docs/forks","keys_url":"https://api.github.com/repos/rawmind0/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rawmind0/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rawmind0/docs/teams","hooks_url":"https://api.github.com/repos/rawmind0/docs/hooks","issue_events_url":"https://api.github.com/repos/rawmind0/docs/issues/events{/number}","events_url":"https://api.github.com/repos/rawmind0/docs/events","assignees_url":"https://api.github.com/repos/rawmind0/docs/assignees{/user}","branches_url":"https://api.github.com/repos/rawmind0/docs/branches{/branch}","tags_url":"https://api.github.com/repos/rawmind0/docs/tags","blobs_url":"https://api.github.com/repos/rawmind0/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rawmind0/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rawmind0/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/rawmind0/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rawmind0/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/rawmind0/docs/languages","stargazers_url":"https://api.github.com/repos/rawmind0/docs/stargazers","contributors_url":"https://api.github.com/repos/rawmind0/docs/contributors","subscribers_url":"https://api.github.com/repos/rawmind0/docs/subscribers","subscription_url":"https://api.github.com/repos/rawmind0/docs/subscription","commits_url":"https://api.github.com/repos/rawmind0/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/rawmind0/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/rawmind0/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/rawmind0/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/rawmind0/docs/contents/{+path}","compare_url":"https://api.github.com/repos/rawmind0/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rawmind0/docs/merges","archive_url":"https://api.github.com/repos/rawmind0/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rawmind0/docs/downloads","issues_url":"https://api.github.com/repos/rawmind0/docs/issues{/number}","pulls_url":"https://api.github.com/repos/rawmind0/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/rawmind0/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/rawmind0/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rawmind0/docs/labels{/name}","releases_url":"https://api.github.com/repos/rawmind0/docs/releases{/id}","deployments_url":"https://api.github.com/repos/rawmind0/docs/deployments","created_at":"2018-07-27T14:14:10Z","updated_at":"2018-07-27T14:14:13Z","pushed_at":"2018-07-27T15:33:44Z","git_url":"git://github.com/rawmind0/docs.git","ssh_url":"git@github.com:rawmind0/docs.git","clone_url":"https://github.com/rawmind0/docs.git","svn_url":"https://github.com/rawmind0/docs","homepage":"","size":26829,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rancher:master","ref":"master","sha":"e9631a46134e3bdcf75e4536fa2bb793ceb017ba","user":{"login":"rancher","id":9343010,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkzNDMwMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":129309629,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkzMDk2Mjk=","name":"docs","full_name":"rancher/docs","owner":{"login":"rancher","id":9343010,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkzNDMwMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/docs","description":"Documentation for Rancher products (for 2.0/new site)","fork":false,"url":"https://api.github.com/repos/rancher/docs","forks_url":"https://api.github.com/repos/rancher/docs/forks","keys_url":"https://api.github.com/repos/rancher/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/docs/teams","hooks_url":"https://api.github.com/repos/rancher/docs/hooks","issue_events_url":"https://api.github.com/repos/rancher/docs/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/docs/events","assignees_url":"https://api.github.com/repos/rancher/docs/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/docs/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/docs/tags","blobs_url":"https://api.github.com/repos/rancher/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/docs/languages","stargazers_url":"https://api.github.com/repos/rancher/docs/stargazers","contributors_url":"https://api.github.com/repos/rancher/docs/contributors","subscribers_url":"https://api.github.com/repos/rancher/docs/subscribers","subscription_url":"https://api.github.com/repos/rancher/docs/subscription","commits_url":"https://api.github.com/repos/rancher/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/docs/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/docs/merges","archive_url":"https://api.github.com/repos/rancher/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/docs/downloads","issues_url":"https://api.github.com/repos/rancher/docs/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/docs/labels{/name}","releases_url":"https://api.github.com/repos/rancher/docs/releases{/id}","deployments_url":"https://api.github.com/repos/rancher/docs/deployments","created_at":"2018-04-12T20:49:13Z","updated_at":"2018-07-30T21:43:32Z","pushed_at":"2018-07-31T03:41:25Z","git_url":"git://github.com/rancher/docs.git","ssh_url":"git@github.com:rancher/docs.git","clone_url":"https://github.com/rancher/docs.git","svn_url":"https://github.com/rancher/docs","homepage":"","size":27274,"stargazers_count":17,"watchers_count":17,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"archived":false,"open_issues_count":44,"license":null,"forks":77,"open_issues":44,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/docs/pulls/545"},"html":{"href":"https://github.com/rancher/docs/pull/545"},"issue":{"href":"https://api.github.com/repos/rancher/docs/issues/545"},"comments":{"href":"https://api.github.com/repos/rancher/docs/issues/545/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/docs/pulls/545/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/docs/pulls/545/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/docs/statuses/7896ff16d0c16ca1c58188eb55144e7f6241e245"}},"author_association":"NONE"}}
{"actor":{"display_login":"rawmind0"}}