Coder Social home page Coder Social logo

tyrannosaurusalex / flannel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flannel-io/flannel

0.0 0.0 0.0 43.58 MB

flannel is a network fabric for containers, designed for Kubernetes

License: Other

Makefile 4.75% Go 89.59% C 5.53% Shell 0.13%

flannel's Introduction

flannel

flannel Logo

Build Status

Flannel is a virtual network that gives a subnet to each host for use with container runtimes.

Platforms like Kubernetes assume that each container (pod) has a unique, routable IP inside the cluster. The advantage of this model is that it reduces the complexity of doing port mapping.

How it works

Flannel runs an agent, flanneld, on each host and is responsible for allocating a subnet lease out of a preconfigured address space. Flannel uses either etcd or the Kubernetes API to store the network configuration, allocated subnets, and auxiliary data (such as host's IP). Packets are forwarded using one of several backend mechanisms.

The following diagram demonstrates the path a packet takes as it traverses the overlay network:

Life of a packet

Getting started

The easiest way to deploy flannel with Kubernetes is to use one of several deployment tools and distributions that network clusters with flannel by default. CoreOS's Tectonic sets up flannel in the Kubernetes clusters it creates using the open source Tectonic Installer to drive the setup process.

Flannel can use the Kubernetes API as its backing store, meaning there's no need to deploy a discrete etcd cluster for flannel. This flannel mode is known as the kube subnet manager.

Adding flannel

Flannel can be added to any existing Kubernetes cluster. It's simplest to add flannel before any pods using the pod network have been started.

For information on deploying flannel manually, using the (currently alpha) Kubernetes installer toolkit kubeadm, see Installing Kubernetes on Linux with kubeadm.

Using flannel

Once applied, the flannel manifest defines three things:

  1. A service account for flannel to use.
  2. A ConfigMap containing both a CNI configuration and a flannel configuration. The network in the flannel configuration should match the pod network CIDR. The choice of backend is also made here and defaults to VXLAN.
  3. A DaemonSet to deploy the flannel pod on each Node. The pod has two containers 1) the flannel daemon itself, and 2) a container for deploying the CNI configuration to a location that the kubelet can read.

When you run pods, they will be allocated IP addresses from the pod network CIDR. No matter which node those pods end up on, they will be able to communicate with each other.

Kubernetes 1.6 requires CNI plugin version 0.5.1 or later.

Documentation

Contact

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

Reporting bugs

See reporting bugs for details about reporting any issues.

License

Flannel is under the Apache 2.0 license. See the LICENSE file for details.

flannel's People

Contributors

aaronlevy avatar andrewrynhard avatar anguslees avatar aoxn avatar bcwaldon avatar dcbw avatar eyakubovich avatar gunjan5 avatar heyitsanthony avatar inthecloud247 avatar jonboulle avatar josselin-c avatar kdomanski avatar kelseyhightower avatar linvjw avatar luxas avatar meghanschofield avatar mgleung avatar mikedanese avatar mohdahmad avatar monder avatar pgburt avatar philips avatar robszumski avatar salamaniibm avatar steveej avatar titanous avatar tomdee avatar vaijab avatar zbwright avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.