Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Beyond Block Diagrams: Different Ways of Understanding K8s Architecture

Kim Schlesinger
November 01, 2021
71

Beyond Block Diagrams: Different Ways of Understanding K8s Architecture

Most introductory Kubernetes videos and blog posts use static block diagrams to illustrate the core components of Kubernetes and how they interact. These diagrams don’t convey the dynamic communication between the K8s control plane, nodes, and pods, and we owe it to ourselves and people new to the field more accurate and engaging ways of representing Kubernetes architecture. This talk will demonstrate a few different methods to visualize how Kubernetes components work together including a time-sequence diagram that models what happens when a user creates a pod using the Kubernetes command line tool, kubectl, and how to use Jaeger to see an http request move onto different nodes by traveling through a load balancer, to a service, and arriving at a specific pod. This talk is for people who are new to Kubernetes and want to understand how the system is designed, as well as experienced engineers who are curious about alternative ways of visualizing Kubernetes architecture.

Kim Schlesinger

November 01, 2021
Tweet

Transcript

  1. Kim Schlesinger, DigitalOcean
    Beyond Block Diagrams: Different Ways of
    Understanding K8s Architecture

    View full-size slide

  2. Hi, I’m Kim
    Developer Advocate
    Site Reliability Engineer
    JavaScript Developer
    Elementary School Teacher
    2018
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  3. Cloud Native Generation
    Photo source: https://unsplash.com/photos/8iZG31eXkks
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  4. “Any framework that you
    can hold as a mental
    representation of an
    external reality.”
    - What is a mental model? by Julia Clavien
    Mental Models
    Photo source: https://unsplash.com/photos/3KGF9R_0oHs
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  5. From the Kubernetes Documentation, Kubernetes Components: https://kubernetes.io/docs/concepts/overview/components/
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  6. Hire, train and retain early-career engineers with limited
    computing experience
    Why?
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  7. Takeaways
    1. Create diagrams that show the passage of time
    2. Use distributed tracing technology as a learning tool
    3. Build 3D models of Kubernetes clusters
    Photo source: https://unsplash.com/photos/_gEKtyIbRSM
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  8. Agenda
    1. Time Sequence Diagram
    2. Distributed Traces + Diagram
    3. 3D Model
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  9. Agenda
    1. Time Sequence Diagram
    2. Distributed Traces + Diagram
    3. 3D Model
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  10. Example
    Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model @kimschles
    Beyond Block Diagrams

    View full-size slide

  11. kubectl create -f pod.yaml
    Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model @kimschles
    Beyond Block Diagrams

    View full-size slide

  12. Time Sequence Diagram
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  13. Agenda
    1. Time Sequence Diagram
    2. Distributed Traces + Diagram
    3. 3D Model
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  14. Agenda
    1. Time Sequence Diagram
    2. Distributed Traces + Diagram
    3. 3D Model
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  15. Distributed Tracing
    “Distributed tracing, also called distributed request
    tracing, is a method used to profile and monitor
    applications, especially those built using a
    microservices architecture.”
    - OpenTracing Project
    Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  16. Meow-Micro 🐈
    ● 2 go microservices
    ● The meow-client accepts
    requests via a REST API and
    uses GRPC to communicate
    with the meow-server
    ● Fernando Diaz at GitLab
    Example
    Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model @kimschles
    Beyond Block Diagrams

    View full-size slide

  17. curl http://143.244.209.228/meow -X POST -d '{"name": "Meow-Mixer"}'
    Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model @kimschles
    Beyond Block Diagrams

    View full-size slide

  18. @kimschles
    Beyond Block Diagrams
    From Setting up Distributed Tracing with OpenTelemetry & Jaeger in Kubernetes Ingress-NGINX by Fernando Diaz
    Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model

    View full-size slide

  19. Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model @kimschles
    From Setting up Distributed Tracing with OpenTelemetry & Jaeger in Kubernetes Ingress-NGINX by Fernando Diaz
    Beyond Block Diagrams

    View full-size slide

  20. @kimschles
    Beyond Block Diagrams Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model

    View full-size slide

  21. @kimschles
    Beyond Block Diagrams
    Weaveworks kspan
    Example: rollout of a
    Deployment of two Pods
    From weaveworks-experiments/kspan: Turning Kubernetes Events into spans

    View full-size slide

  22. Agenda
    1. Time Sequence Diagram
    2. Distributed Traces + Diagram
    3. 3D Model
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  23. Agenda
    1. Time Sequence Diagram
    2. Distributed Traces + Diagram
    3. 3D Model
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  24. Example
    Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model @kimschles
    Beyond Block Diagrams

    View full-size slide

  25. kubectl create -f pod.yaml
    Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model @kimschles
    Beyond Block Diagrams

    View full-size slide

  26. Time Sequence Diagram | Distributed Tracing + Diagram | 3D Model @kimschles
    Beyond Block Diagrams

    View full-size slide

  27. Agenda
    1. Time Sequence Diagram
    2. Distributed Traces + Diagram
    3. 3D Model
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  28. @kimschles
    Beyond Block Diagrams
    Recap

    View full-size slide

  29. “Any framework that you
    can hold as a mental
    representation of an
    external reality.”
    - What is a mental model? by Julia Clavien
    Mental Models
    Photo source: https://unsplash.com/photos/3KGF9R_0oHs
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  30. Cloud Native Generation
    Photo source: https://unsplash.com/photos/8iZG31eXkks
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  31. From the Kubernetes Documentation, Kubernetes Components: https://kubernetes.io/docs/concepts/overview/components/
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  32. Takeaways
    1. Create diagrams that show the passage of time
    2. Use distributed tracing technology as a learning tool
    3. Build 3D models of Kubernetes clusters
    Photo source: https://unsplash.com/photos/_gEKtyIbRSM
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  33. Hire, train and retain early-career engineers with limited
    computing experience
    Why?
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  34. Resources
    Examples of Kubernetes Time Sequence Diagrams
    ● Writing custom Kubernetes Scheduler - My Fake Tardis
    ● A Sequential Breakdown of the Kubernetes Deployment Process-
    ContainerLabs
    Time Sequence Diagram Generator
    ● SequenceDiagram.org - UML Sequence Diagram Online Tool
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  35. Resources
    Distributed Tracing with Jaeger and ingress-nginx
    ● Jaeger: open source, end-to-end distributed tracing
    ● OpenTracing - NGINX Ingress Controller
    Tutorial
    ● Setting up Distributed Tracing in Kubernetes with OpenTracing, Jaeger,
    and Ingress-NGINX by Fernando Diaz, @awkwardferny
    Diagram Tool
    ● LucidChart
    @kimschles
    Beyond Block Diagrams

    View full-size slide

  36. Resources
    kspan
    ● Traces from Events: A New Way to Visualise Kubernetes Activities - Bryan
    Boreham
    ● weaveworks-experiments/kspan: Turning Kubernetes Events into spans
    @kimschles
    Beyond Block Diagrams

    View full-size slide