Top Banner
Cloud Native Networking January 12, 2017 Webinar Series
22

Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

May 22, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Cloud Native Networking

January 12, 2017

Webinar Series

Page 2: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Your Presenters

2

Christopher LiljenstolpeCTO, Tigera / Founder, Project Calico

Bryan BorehamDirector of Engineering, WeaveWorks

Page 3: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Networking in CNCF Reference Architecture

3

• Resource Management• Image Management• Container Management• Compute Resources

• Cloud Native – Network • Network Segmentation and Policy• SDN & APIs (eg CNI, libnetwork)

• Cloud Native- Storage

• Volume Drivers/Plugins

• Local Storage Management

• Remote Storage Access

Application Definition/ Development

Orchestration & Management

Runtime

Provisioning

Infrastructure (Bare Metal/Cloud)

Page 4: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

First Iteration of Container Networking: Port Mapping

4

www1

www2

eth0: port: 80

eth0: port: 80

bridge

eth0: 59.243.125.13port: 32768

port: 32769

Kinda works… But…● Port clashes (as above)● Service discovery (custom code required)

client

Page 5: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Enter Cloud Native Networks...

5

Give each container its own IP address

Page 6: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Give each container its own IP address

6

client

www1

www2

eth0: 172.17.0.1port: 80

eth0: 172.17.0.2port: 80

Page 7: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Give each container its own IP address

7

Give each container its own IP address

✓ Port clash disappears

✓ Workload discovery: as easy as a DNS lookup

✓ Kubernetes took this approach from outset

✓ We know this works at large scale

Page 8: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Linux kernel: the ultimate networking toolkit

8

20Mlines of code

~35%of which is networking

Page 9: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

What’s in a Cloud Native Network solution?

9

Control Plane Data Plane

● assigns IPs (from a pool given to it)

● distributes routing information (i.e. how to get to this workload)

● distributes policy (e.g. who can connect to whom)

for each packet to/ from the workload:

● enforces policy

● forwards it to the right destination

Page 10: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Control plane implementation options

10

● Distributed key/value store○ e.g. etcd (used by flannel, Calico)

● Routing protocols○ e.g. BGP (used by Calico)

● Gossip protocol○ e.g. Weave Mesh (used by Weave Net)

● Centralized controller○ e.g. traditional SDNs

Control Plane

Page 11: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Overlay � packet encapsulation

● Forwarding engine:○ Kernel forwarding or user space

● Transport mechanism○ overlay or natively using the underlying network

Data plane implementation options

11

Data Plane

Packet header Packet data

Inner packet header Packet dataEncap

infoOuter packet

header

Page 12: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Plug-in Models

12

Container Network Interface (CNI)

Container Network Model

(CNM / libnetwork)

Page 13: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Selecting the right network plug-in

13

Features:● Do I need specific network features

such as multicast or encryption?Flexibility:

● Does it have to work in my own datacenter; on my laptop; in the cloud; across combinations of these?

● In the cloud do I need my container network to cross zones or regions?

● Are there limits on how many hosts I can connect?

Ease of configuration● What do I have to install before the

container network?● What do I have to configure before it

will work?Resilience

● What are the solution’s failure modes / reliability profile?

● What events is it resilient to? (loss of one node, link, data center, ...)

Monitoring and Troubleshooting● What tools do I need to monitor the

network?● What expertise do I need to troubleshoot?

Security - does the container network give me protection against:

● Snooping● Unwanted communication between

servicesScale and Performance:

● What is the necessary ‘convergence’ time?

● What are the performance requirements of my application?

● What are the solution’s scaling characteristics? Does it “scale out” as my cluster grows, or depend on a centralized controller that must “scale up”?

Page 14: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Securing the Network with Policy

14

Page 15: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

15

Page 16: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

16

Page 17: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

17

Page 18: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Using policy to separate application tiers

18

Server Server Server Server

Physical Network

Page 19: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Using policy to separate application tiers

19

kind: NetworkPolicymetadata: name: middle-tier-policyspec: podSelector: tier: middle ingress: - from: - podSelector: matchLabels: tier: frontend

Middle Tier Policy

kind: NetworkPolicymetadata: name: frontend-policyspec: podSelector: tier: frontend ingress: - ports: - protocol: tcp port: 80

Frontend Tier Policy

kind: NetworkPolicymetadata: name: database-policyspec: podSelector: tier: database ingress: - from: - podSelector: matchLabels: tier: middle ports: - protocol: tcp port: 6379

Database Tier Policy

Page 20: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Enforced container topology

20

Front end RedisMiddle tierMiddle tierFront endFront end Middle tier RedisRedis:80 :6379

Page 21: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Summary

Networking is a key element of Cloud Native computing

IP-per-container is now established best practice, simplest for developers & operations

Multiple ways to implement – decide what is right for your application deployment environment

21

IP

Page 22: Webinar Series Networking Cloud Native...Kubernetes took this approach from outset We know this works at large scale. Linux kernel: the ultimate networking toolkit 8 20M lines of code

Thank You

22