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

Picture-story Kubernetes

7ba12981020b07491850af953d794f54?s=47 aoi
November 24, 2021

Picture-story Kubernetes

Picture-story Kuberenetes.
Made for Kubernetes beginners



November 24, 2021

More Decks by aoi

Other Decks in Technology


  1. OK for infrastructure beginners! Picture-story Kubernetes Aoi

  2. Self Introduction Name: Aoi Work as software engineer at Cybozu

    twitter: @_a0i
  3. First What I am going to speak • Abstracts and

    consideration about Kubernetes Not speak about • Description about Docker and containers • How to useKubernetes
  4. Episode 1:Here Comes Kubernetes!   Why Kubernetes was created Episode 2:Kubernetes

    and the Days   Deployment flow for Kubernetes Episode 3:And the Journy Continues   Mechanisms to keep running Kubernetes 目次
  5. Here Comes Kubernetes!

  6. There was a big Java application Once Upon a Time...

  7. There Were No Problems in the Beginning But... A failure

    in one place affects the whole takes time to start takes time to release
  8. The Developers Thought...

  9. Let’s Use Containers to Make Our Applications Smaller!

  10. But That Doesn't Make the Challenge Go Away. Hard to

    detect a failure and bring the container back up. Which server did I deploy the container? Where should I deploy the container?
  11. Hey It's me Kubernetes

  12. What Makes You Happy When You Use a Container? ・Containers

    are faster to boot than virtual machines. ・Applications are isolated in containers, which is convenient. On the other hand, containers become disorganized and difficult to manage.
  13. App Guest OS Host OS Hardware Virtual Machine Container Hypervisor

    Guest OS Middle ware Middle ware App App App App App App App Middle ware Middle ware Hardware Host OS Container Runtime
  14. What is Kubernetes? Kubernetes is a portable, extensible, open-source platform

    for managing containerized workloads and services, that facilitates both declarative configuration and automation. (From Kubernetes Document https://kubernetes.io/docs/concepts/overvie w/what-is-kubernetes/)
  15. 1. Implement “Infrastructure As Code” through the use of resource

    configuration files called manifests 2. Standardized and abstracted by Kubernetes API, no need to know server-specific settings 3. Reconciliation Loop Kubernetes Makes Container Operations Convenient
  16. apiVersion: v1 kind: Pod metadata: name: nginx spec: containers: -

    name: test image: nginx:1.14.2 resources: requests: memory: "100Mi" Example of manifest:nginx container Which server to deploy? What Operating System to use?Specification of the server memory? No need to worry!
  17. Reconciliation Loop Want two container OK!

  18. Reconciliation Loop Nooooooooo oh

  19. Reconciliation Loop ♪ Here’s two!

  20. Kubernetes And The Days

  21. Understand that Kubernetes helps operations but...

  22. ・・・。 How exactly is it useful for developers?

  23. Application Development to Date Application Virtual Machine Abstracted for simplicity.

    Access by Browser! Config files
  24. To Develop Using Containers... Connection between containers? App App App

    Middle ware Middle ware Hardware Host OS Container Runtime How to Access from the outside? How to pass the configuration file? How to use storage?
  25. Isn't it Getting Harder?

  26. Anyone Calling Me?

  27. This is What Happens When You Use Kubernetes! Service Container

    Container Pod ConfigMap
  28. Application Development Using Kubernetes CI Container Registry docker build docker

    push pull Service
  29. Application Development Using Kubernetes CI Container Registry docker build docker

    push pull Service manifest kubectl apply
  30. Is it Good to manually kubectl apply each time? kubectl

    apply kubectl apply How do you manage it? When to apply? Which environment to apply it to?
  31. CIOps push kick Manifest Repository CI Tool

  32. GitOps push pull Manifest Repository Deploy Tool

  33. Difference? CIOps:Push-based model. It is easy to understand and intuitive

    because it automates what kubectl apply does. GitOps:Pull-based model. Because it is declarative, the managed manifest is always the correct configuration.
  34. Kubernetes Architecture kube- apiserver etcd controller manager kubelet kube- proxy

    kubectl kube- scheduler Control Plane Node Node kubelet kube- proxy
  35. And the Journy Continues

  36. One night, the container seems to have gone bad... What

    do we do now?
  37. I'll Take Care!

  38. Various Health Check Mechanisms Remove non-healthy pods from services Create

    a new pod Service Service
  39. Move resources to another Node automatically. In Case of Node

  40. Still, Failures Happen: Examples from Other Companies Deleting a cluster

    in the production environment (Spotify) Cleanup process removes Docker images from production environment (Airbnb)
  41. • No matter how good Kubernetes is, failures will occur.

    • “Logging in to a VM, checking it with ps or systemctl, and looking at the log file" is no longer an option. Log! Metrics! Alert! Important! Observability
  42. Let's Enjoy Kubernetes!

  43. Reference Kubernetesとは何か? https://kubernetes.io/ja/docs/concepts/overview/what-is-kubernetes/ Using Pods https://kubernetes.io/docs/concepts/workloads/pods/#using-pods 10 More Weird Ways

    to Blow Up Your Kubernetes - Jian Cheung & Joseph Kim, Airbnb https://www.youtube.com/watch?v=4CT0cI62YHk Keynote: How Spotify Accidentally Deleted All its Kube Clusters with No User Impact - David Xia https://www.youtube.com/watch?v=ix0Tw8uinWs Kubernetes Failure Stories https://k8s.af