Networking and Kubernetes

Book description

Kubernetes has become an essential part of the daily work for most system, network, and cluster administrators today. But to work effectively together on a production-scale Kubernetes system, they must be able to speak the same language. This book provides a clear guide to the layers of complexity and abstraction that come with running a Kubernetes network.

Authors James Strong and Vallery Lancey bring you up to speed on the intricacies that Kubernetes has to offer for large container deployments. If you're to be effective in troubleshooting and maintaining a production cluster, you need to be well versed in the abstraction provided at each layer. This practical book shows you how.

  • Learn the Kubernetes networking model
  • Choose the best interface for your clusters from the CNCF Container Network Interface project
  • Explore the networking and Linux primitives that power Kubernetes
  • Quickly troubleshoot networking issues and prevent downtime
  • Examine cloud networking and Kubernetes using the three major providers: Amazon Web Services, Google Cloud, and Microsoft Azure
  • Learn the pros and cons of various network tools--and how to select the best ones for your stack

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Just Another Packet
    2. Who This Book Is For
    3. What You Will Learn
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  2. 1. Networking Introduction
    1. Networking History
    2. OSI Model
    3. TCP/IP
      1. Application
      2. Transport
      3. Network
      4. Internet Protocol
      5. Link Layer
      6. Revisiting Our Web Server
    4. Conclusion
  3. 2. Linux Networking
    1. Basics
    2. The Network Interface
    3. The Bridge Interface
    4. Packet Handling in the Kernel
      1. Netfilter
      2. Conntrack
      3. Routing
    5. High-Level Routing
      1. iptables
      2. IPVS
      3. eBPF
    6. Network Troubleshooting Tools
      1. Security Warning
      2. ping
      3. traceroute
      4. dig
      5. telnet
      6. nmap
      7. netstat
      8. netcat
      9. Openssl
      10. cURL
    7. Conclusion
  4. 3. Container Networking Basics
    1. Introduction to Containers
      1. Applications
      2. Hypervisor
      3. Containers
    2. Container Primitives
      1. Control Groups
      2. Namespaces
      3. Setting Up Namespaces
    3. Container Network Basics
      1. Docker Networking Model
      2. Overlay Networking
      3. Container Network Interface
    4. Container Connectivity
      1. Container to Container
      2. Container to Container Separate Hosts
    5. Conclusion
  5. 4. Kubernetes Networking Introduction
    1. The Kubernetes Networking Model
    2. Node and Pod Network Layout
      1. Isolated Networks
      2. Flat Networks
      3. Island Networks
      4. kube-controller-manager Configuration
    3. The Kubelet
    4. Pod Readiness and Probes
    5. The CNI Specification
    6. CNI Plugins
      1. The IPAM Interface
      2. Popular CNI Plugins
    7. kube-proxy
      1. userspace Mode
      2. iptables Mode
      3. ipvs Mode
      4. kernelspace Mode
    8. NetworkPolicy
      1. NetworkPolicy Example with Cilium
      2. Selecting Pods
      3. Rules
    9. DNS
    10. IPv4/IPv6 Dual Stack
    11. Conclusion
  6. 5. Kubernetes Networking Abstractions
    1. StatefulSets
    2. Endpoints
    3. Endpoint Slices
    4. Kubernetes Services
      1. NodePort
      2. ClusterIP
      3. Headless
      4. ExternalName Service
      5. LoadBalancer
      6. Services Conclusion
    5. Ingress
    6. Ingress Controllers and Rules
    7. Service Meshes
    8. Conclusion
  7. 6. Kubernetes and Cloud Networking
    1. Amazon Web Services
      1. AWS Network Services
      2. Amazon Elastic Kubernetes Service
      3. Deploying an Application on an AWS EKS Cluster
    2. Google Compute Cloud (GCP)
      1. GCP Network Services
      2. GKE
    3. Azure
      1. Azure Networking Services
      2. Azure Kubernetes Service
      3. Deploying an Application to Azure Kubernetes Service
    4. Conclusion
  8. Index

Product information

  • Title: Networking and Kubernetes
  • Author(s): James Strong, Vallery Lancey
  • Release date: September 2021
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492081654