the architecture along the way
play

& the architecture along the way! @mt165 mt165.co.uk The life - PowerPoint PPT Presentation

QCon London March 2019 & the architecture along the way! @mt165 mt165.co.uk The life of a packet through Istio @mt165 Objectives Learn how a packet traverses an Istio/Envoy/Kubernetes system See what control plane calls are made in that


  1. QCon London March 2019 & the architecture along the way! @mt165 mt165.co.uk

  2. The life of a packet through Istio @mt165 Objectives Learn how a packet traverses an Istio/Envoy/Kubernetes system See what control plane calls are made in that process Build a useful mental model for reasoning about, and debugging Istio

  3. The life of a packet through Istio @mt165 Prerequisites Basic networking knowledge Intermediate Kubernetes knowledge An understanding of what Istio is and does

  4. The life of a packet through Istio @mt165 Outline ● Context and Introduction ● Networking and Containers ● Pilot and Routing ● Mixer and Policy ● Citadel and mTLS

  5. The life of a packet through Istio @mt165 Context and Introduction

  6. The life of a packet through Istio @mt165 Why?

  7. The life of a packet through Istio @mt165

  8. The life of a packet through Istio @mt165

  9. The life of a packet through Istio @mt165 Istio “An open platform to connect , secure , control , and observe services.”

  10. The life of a packet through Istio @mt165 Networking and Containers

  11. The life of a packet through Istio @mt165 Ingress Service A

  12. The life of a packet through Istio @mt165 Cluster IP Cluster IP Node Envoy port Envoy *.example.com Envoy Envoy Load Service A Ingress Balancer

  13. The life of a packet through Istio @mt165 Service A

  14. The life of a packet through Istio @mt165 Envoy SvcA Service A

  15. The life of a packet through Istio @mt165 “Containers” nginx nginx supervisord mnt uts pid user ipc net

  16. The life of a packet through Istio @mt165 Kubernetes Pods nginx logger nginx fluentd supervisord mnt mnt uts uts pid user ipc net

  17. The life of a packet through Istio @mt165 Kubernetes Pods iptables nginx logger routes 192.168.0.42 eth0 nginx fluentd lo supervisord mnt mnt sockets uts uts pid user ipc net

  18. The life of a packet through Istio @mt165 Kubernetes Pods iptables nginx logger routes 192.168.0.42 eth0 :8080/tcp nginx fluentd lo supervisord mnt mnt sockets uts uts pid user ipc net

  19. The life of a packet through Istio @mt165 Kubernetes Pods iptables nginx proxy routes 192.168.0.42 eth0 :8080/tcp nginx envoy lo supervisord mnt mnt sockets uts uts pid user ipc net

  20. The life of a packet through Istio @mt165 Sidecar Injection iptables routes 192.168.0.42 eth0 lo sockets pid user ipc net

  21. The life of a packet through Istio @mt165 Sidecar Injection iptables routes 192.168.0.42 alpine sysctl -w kernel.core_pattern=... eth0 lo sockets pid user ipc net

  22. The life of a packet through Istio @mt165 Sidecar Injection iptables routes 192.168.0.42 istio/proxy_init /usr/local/bin/prepare_proxy.sh -p 15001 -u 1337 eth0 lo sockets pid user ipc net

  23. The life of a packet through Istio @mt165 Sidecar Injection iptables nginx istio/proxy routes 192.168.0.42 eth0 nginx envoy lo :15001/tcp mnt mnt sockets uts uts pid user ipc net

  24. The life of a packet through Istio @mt165 Envoy SvcA Service A

  25. The life of a packet through Istio @mt165 Pilot and Routing

  26. The life of a packet through Istio @mt165 ? ? Envoy SvcA ? Service A

  27. The life of a packet through Istio @mt165 Services $ kubectl get service -o wide service-b NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR service-b ClusterIP 10.98.84.169 <none> 80/TCP 90s app=service-b

  28. The life of a packet through Istio @mt165 Service DNS exposure $ dig service-b.default.svc.cluster.local. ;; ANSWER SECTION: service-b.default.svc.cluster.local. 5 IN A 10.98.84.169

  29. The life of a packet through Istio @mt165 Pods $ kubectl get pods -o wide | grep service-b service-b-644856485c-4rk88 1/1 Running 0 7m46s 10.32.0.4 kind-1-control-plane <none> service-b-644856485c-dc2zv 1/1 Running 0 7m46s 10.32.0.6 kind-1-control-plane <none> service-b-644856485c-gr75k 1/1 Running 0 7m46s 10.32.0.5 kind-1-control-plane <none>

  30. The life of a packet through Istio @mt165 Endpoints $ kubectl get endpoints service-b NAME ENDPOINTS AGE service-b 10.32.0.4:8080,10.32.0.5:8080,10.32.0.6:8080 8m55s

  31. The life of a packet through Istio @mt165 Endpoints $ kubectl get endpoints service-b -o yaml ... subsets: - addresses: - ip: 10.32.0.4 nodeName: kind-1-control-plane targetRef: kind: Pod … ports: - name: http port: 8080 protocol: TCP

  32. The life of a packet through Istio @mt165 Control Plane API Pilot Config to Envoys Envoy SvcA Service A

  33. The life of a packet through Istio @mt165 k8s consul zk Control Plane API Pilot Config to Envoys Data plane API Envoy SvcA Service A

  34. The life of a packet through Istio @mt165 Pilot ● Ingress Routing ● Traffic Mirroring ● Traffic Shifting ● Canary Deployments ● Circuit Breaking ● Fault Injection

  35. The life of a packet through Istio @mt165 Mixer and Policy

  36. The life of a packet through Istio @mt165 Control Plane API Pilot Config to Envoys Envoy SvcA Service A Service B

  37. The life of a packet through Istio @mt165 Control Plane API Mixer Pilot Config to Envoys Policy checks, Telemetry Envoy Envoy SvcA SvcB Service A Service B

  38. The life of a packet through Istio @mt165 IP 5-tuple (src_addr, src_port, dst_addr, dst_port, proto)

  39. The life of a packet through Istio @mt165 IP Router Architecture BGP OSPF ARP STP CONTROL PLANE Router Information Base DATA PLANE Forwarding User process Information Base Kernel module Interrupt

  40. The life of a packet through Istio @mt165 IP Router Architecture BGP OSPF ARP STP CONTROL PLANE Router Information PILOT Base DATA PLANE Forwarding User process MIXER Information Base Kernel module ENVOY Interrupt

  41. The life of a packet through Istio @mt165 Control Plane API Pilot Config to REPORT Envoys prom ES Mixer Mixer fat client Mixer fat client Envoy Envoy RBAC Rate SvcA SvcB limit CHECK Service A Service B

  42. The life of a packet through Istio @mt165 Mixer ● Check ○ ACLs / Authorization ○ Rate Limiting ● Report ○ Logs ○ Metrics ○ Tracing

  43. The life of a packet through Istio @mt165 Control Plane API Mixer Pilot Config to Envoys Policy checks, Telemetry Envoy Envoy SvcA SvcB Service A Service B

  44. The life of a packet through Istio @mt165 Control Plane API Mixer Citadel Pilot Config to TLS certs Envoys to Envoys Policy checks, Telemetry Envoy Envoy SvcA SvcB Service A Service B

  45. The life of a packet through Istio @mt165 Control Plane API Mixer Citadel Pilot Config to TLS certs Envoys to Envoys Policy checks, Telemetry Envoy Envoy SvcA SvcB Service A Service B

  46. The life of a packet through Istio @mt165 Control Plane API Mixer Citadel Pilot Config to TLS certs Envoys to Envoys Policy checks, Telemetry Envoy Envoy Envoy Envoy Envoy Envoy Envoy Envoy SvcA SvcB Envoy Envoy Ingress Service A Service B Egress

  47. The life of a packet through Istio @mt165 Control Plane API API Server Mixer Citadel Pilot etcd Config to TLS certs Envoys to Envoys Policy checks, Telemetry kubectl Envoy Envoy SvcA SvcB Service A Service B

  48. The life of a packet through Istio @mt165 Control Plane API Galley Mixer Citadel Pilot etcd Config to TLS certs Envoys to Envoys Policy checks, Telemetry kubectl Envoy Envoy SvcA SvcB Service A Service B

  49. The life of a packet through Istio @mt165 Outline ● Context and Introduction ● Networking and Containers ● Pilot and Routing ● Mixer and Policy ● Citadel and mTLS

  50. The life of a packet through Istio @mt165 Recap We learned: ● How a packet traverses an Istio/Envoy/Kubernetes system ● What control plane calls are made in that process ● A useful mental model for reasoning about, and debugging Istio

  51. Thanks! @mt165 QR CODE

Recommend


More recommend