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

Наш опыт с Kubernetes в небольших проектах

flant
June 06, 2017

Наш опыт с Kubernetes в небольших проектах

Доклад технического директора компании «Флант» (http://flant.ru/) Дмитрия Столярова на РИТ++ 2017 про устройство Kubernetes и наш опыт его использования в production.

* Текстовый обзор доклада: https://habrahabr.ru/company/flant/blog/331188/
* Видео с выступления: https://www.youtube.com/watch?v=CgCLPYJRxbU
* Анонс доклада на сайте конференции: http://rootconf.ru/2017/abstracts/2701

flant

June 06, 2017
Tweet

More Decks by flant

Other Decks in Technology

Transcript

  1. # whoami dmitry.stolyarov # hostname -d flant.ru # cat /etc/motd

    Наш опыт с Kubernetes в небольших проектах Привет!
  2. Небольшие проекты? Маленькие < 50 nodes < 1 500 pods

    Большие > 500 nodes > 15 000 pods Средние 50–500 nodes 1500–15 000 pods Kubernetes масштабируется до 5 000 nodes & 150 000 pods
  3. Небольшие проекты? Маленькие < 50 nodes < 1 500 pods

    Большие > 500 nodes > 15 000 pods Средние 50–500 nodes 1500–15 000 pods Kubernetes масштабируется до 5 000 nodes & 150 000 pods Небольшие
  4. Backend memcached Files Sphinx Background Jobs Redis Cron DB master

    DB slave Backend memcached Frontend Frontend
  5. memcached Files Sphinx Background Jobs Redis Cron DB master DB

    slave memcached Frontend Frontend Backend Backend
  6. Frontend Backend Sphinx memcached Cron DB master DB slave Frontend

    Backend Background Jobs Redis memcached Files nfs-сервер
  7. Frontend Backend Sphinx memcached Cron DB master DB slave Frontend

    Backend Background Jobs Files nfs-сервер memcached Redis
  8. Frontend Backend Sphinx memcached DB master DB slave Frontend Backend

    Redis Files nfs-сервер memcached Cron Background Jobs
  9. Frontend Backend Sphinx memcached DB master DB slave Frontend Backend

    Redis Files nfs-сервер memcached Cron Background Jobs New Project Backend
  10. Frontend Backend Sphinx memcached DB master DB slave Frontend Backend

    Redis Files nfs-сервер memcached Cron Background Jobs New Project Backend Какие проблемы?
  11. Frontend Frontend Backend Backend Backend Backend Backend Backend DB master

    DB slave Files Memcached Memcached Memcached Redis Cron Background Jobs Sphinx Sphinx
  12. Frontend Frontend Backend Backend Backend Backend Backend Backend DB master

    DB slave Files Memcached Memcached Memcached Redis Cron Background Jobs LB Sphinx Sphinx
  13. Frontend Frontend Backend Backend Backend Backend Backend Backend DB master

    DB slave Files Memcached Memcached Memcached Redis Cron Background Jobs LB Sphinx Sphinx Какие проблемы?
  14. Frontend Frontend Backend Backend Backend Backend Backend Backend DB master

    DB slave Sphinx Sphinx Frontend Frontend Backend Backend Backend Backend Backend Backend DB master DB slave Sphinx Sphinx LB Memcached Memcached Memcached Redis Cron Background Jobs S3 Files
  15. Frontend Frontend Sphinx Sphinx Frontend Frontend Sphinx Sphinx DB master

    DB slave DB master DB slave S3 Files LB Memcached Memcached Memcached Redis Cron Background Jobs Backend-1 Backend-2 Backend-N ... LB
  16. Frontend Frontend Sphinx Sphinx Frontend Frontend Sphinx Sphinx DB master

    DB slave DB master DB slave LB S3 Files Memcached Memcached Memcached Redis Cron Background Jobs Backend-1 Backend-2 Backend-N ...
  17. Backend-1 Backend-2 Backend-N ... Frontend Frontend Sphinx Sphinx Frontend Frontend

    Sphinx Sphinx LB S3 Files Memcached Memcached Memcached Redis Cron Background Jobs DB-1 DB-2 DB-N ...
  18. JOB-1 JOB-2 JOB-N ... Sphinx-1 Spninx-N ... LB DB-1 DB-2

    DB-N ... Backend-1 Backend-2 Backend-N ... Frontend Frontend Frontend Frontend MQ-1 MQ-2 MQ-N ... S3 Files Memcached Memcached Memcached Cron
  19. LB Frontend-1 Frontend-N ... LB Memcached 1 Memcached N ...

    Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... Backend-1 Backend-2 Backend-N ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron
  20. Микросервис S3 Files Cron MQ-1 MQ-2 MQ-N ... JOB-1 JOB-2

    JOB-N ... DB-1 DB-2 DB-N ... LB Backend 1 Backend 2 Backend N ... Sphinx-1 Spрinx-N ... Memcached 1 Memcached N ... Frontend 1 Frontend N ...
  21. Frontend 1 Frontend N ... Memcached 1 Memcached N ...

    Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... Backend 1 Backend 2 ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron LB LB Backend N
  22. Frontend 1 Frontend N ... Memcached 1 Memcached N ...

    Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... Backend 1 Backend 2 ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB Backend N
  23. Frontend 1 Frontend N ... Memcached 1 Memcached N ...

    Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... Backend 1 Backend 2 ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB Backend N 3. Supervision
  24. Frontend 1 Frontend N ... Memcached 1 Memcached N ...

    Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... Backend 1 Backend 2 ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB Backend N 3. Supervision 4. Service Discovery 5. Infrastructure Automation
  25. Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... JOB-1 JOB-2 JOB-N

    ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery Memcached 1 Memcached N ... ... Backend 1 Backend 2 ... Backend N Frontend 1 Frontend N 5. Infrastructure Automation
  26. Frontend 1 Frontend N ... Sphinx-1 Spninx-N ... DB-1 DB-2

    DB-N ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery Memcached 1 Memcached N ... Backend 1 Backend 2 ... Backend N 5. Infrastructure Automation
  27. Frontend 1 Frontend N ... Memcached 1 Memcached N ...

    Sphinx-1 Spninx-N ... Backend 1 Backend 2 ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB Backend N 3. Supervision 4. Service Discovery DB-1 DB-2 DB-N ... 5. Infrastructure Automation
  28. Frontend 1 Frontend N ... Memcached 1 Memcached N ...

    Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... Backend 1 Backend 2 ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB Backend N 3. Supervision 4. Service Discovery 5. Infrastructure Automation
  29. 5. Infrastructure Automation Frontend 1 Frontend N ... Memcached 1

    Memcached N ... Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... Backend 1 Backend 2 ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB Backend N 3. Supervision 4. Service Discovery 6. (Auto) Scaling
  30. 6. (Auto) Scaling 5. Infrastructure Automation Frontend 1 Frontend N

    ... Memcached 1 Memcached N ... Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery 7. CI/CD Backend 1 Backend 2 ... Backend N
  31. 6. (Auto) Scaling 5. Infrastructure Automation Frontend 1 Frontend N

    ... Memcached 1 Memcached N ... Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery 7. CI/CD Backend 1 Backend 2 ... Backend N
  32. 6. (Auto) Scaling 5. Infrastructure Automation Frontend 1 Frontend N

    ... Memcached 1 Memcached N ... Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery 7. CI/CD Backend 1 Backend 2 ... Backend N JOB-1 JOB-2 JOB-N ...
  33. 6. (Auto) Scaling 5. Infrastructure Automation Frontend 1 Frontend N

    ... Memcached 1 Memcached N ... Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... MQ-1 MQ-2 MQ-N ... S3 Files 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery 7. CI/CD Backend 1 Backend 2 ... Backend N JOB-1 JOB-2 JOB-N ... Cron
  34. 6. (Auto) Scaling 5. Infrastructure Automation Frontend 1 Frontend N

    ... Memcached 1 Memcached N ... DB-1 DB-2 DB-N ... MQ-1 MQ-2 MQ-N ... S3 Files 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery 7. CI/CD Backend 1 Backend 2 ... Backend N JOB-1 JOB-2 JOB-N ... Cron Sphinx-1 Spninx-N ...
  35. 6. (Auto) Scaling 5. Infrastructure Automation Memcached 1 Memcached N

    ... DB-1 DB-2 DB-N ... MQ-1 MQ-2 MQ-N ... S3 Files 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery 7. CI/CD Backend 1 Backend 2 ... Backend N JOB-1 JOB-2 JOB-N ... Cron Sphinx-1 Spninx-N ... Frontend 1 Frontend N ...
  36. 6. (Auto) Scaling 5. Infrastructure Automation Memcached 1 Memcached N

    ... DB-1 DB-2 DB-N ... MQ-1 MQ-2 MQ-N ... S3 Files 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery 7. CI/CD Backend 1 Backend 2 ... Backend N JOB-1 JOB-2 JOB-N ... Cron Sphinx-1 Spninx-N ... Frontend 1 Frontend N ...
  37. 7. CI/CD 6. (Auto) Scaling 5. Infrastructure Automation Frontend 1

    Frontend N ... Memcached 1 Memcached N ... Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery Backend 1 Backend 2 ... Backend N 8. Vendor lock-in
  38. 7. CI/CD 6. (Auto) Scaling 5. Infrastructure Automation Frontend 1

    Frontend N ... Memcached 1 Memcached N ... Sphinx-1 Spninx-N ... DB-1 DB-2 DB-N ... JOB-1 JOB-2 JOB-N ... MQ-1 MQ-2 MQ-N ... S3 Files Cron 1. Logging 2. Metrics LB LB 3. Supervision 4. Service Discovery Backend 1 Backend 2 ... Backend N 8. Vendor lock-in
  39. node-1 node-2 ... master Архитектура Kubernetes Docker Docker kubelet kubelet

    kube-proxy kube-proxy API Server etcd Scheduler Сontroller -manager
  40. node-1 node-2 ... master Архитектура Kubernetes Docker Docker kubelet kubelet

    kube-proxy kube-proxy API Server etcd Scheduler Сontroller -manager kubectl
  41. node-1 node-2 ... master Архитектура Kubernetes Docker Docker kubelet kubelet

    kube-proxy kube-proxy API Server etcd Scheduler Сontroller -manager kubectl YAML (Declarative DSL)
  42. node-1 node-2 ... master Архитектура Kubernetes Docker Docker kubelet kubelet

    kube-proxy kube-proxy API Server etcd Scheduler Сontroller -manager kubectl YAML (Declarative DSL)
  43. node-1 node-2 ... master Архитектура Kubernetes Docker Docker kubelet kubelet

    kube-proxy kube-proxy API Server etcd Scheduler Сontroller -manager kubectl YAML (Declarative DSL)
  44. node-1 node-2 ... master Архитектура Kubernetes Docker Docker kubelet kubelet

    kube-proxy kube-proxy API Server etcd Scheduler Сontroller -manager kubectl YAML (Declarative DSL)
  45. Pod

  46. Label & Selector app: foo tier: backend version: 0.15.7 partition:

    customer_a app in (foo, bar) tier == backend
  47. Label & Selector app: foo tier: backend version: 0.15.7 partition:

    customer_a app in (foo, bar) tier == backend partition != customer_a
  48. Pod Container 1 Container 2 ... localhost eth0 volume1 volume2

    tier: backend 5. Infrastructure Automation version: 0.15.7
  49. 3. Supervision Pod Container 1 Container 2 ... localhost eth0

    volume1 volume2 tier: backend 5. Infrastructure Automation version: 0.15.7
  50. 3. Supervision Pod Container 1 Container 2 ... localhost eth0

    volume1 volume2 tier: backend 5. Infrastructure Automation 4. Service Discovery version: 0.15.7
  51. node-1 node-2 ... master Архитектура Kubernetes Docker Docker kubelet kubelet

    kube-proxy kube-proxy API Server etcd Scheduler Сontroller -manager kubectl YAML (Declarative DSL)
  52. node-1 node-2 ... master Архитектура Kubernetes Docker Docker kubelet kubelet

    kube-proxy kube-proxy API Server etcd Scheduler Сontroller -manager kubectl YAML (Declarative DSL)
  53. apiVersion: v1 kind: Pod metadata: name: manual-bash spec: containers: -

    name: bash image: ubuntu:16.04 command: bash args: [-c, “while true; do sleep 1; date; done”]
  54. apiVersion: v1 kind: Pod metadata: name: manual-bash spec: containers: -

    name: bash image: ubuntu:16.04 command: bash args: [-c, “while true; do sleep 1; date; done”]
  55. apiVersion: v1 kind: Pod metadata: name: manual-bash spec: containers: -

    name: bash image: ubuntu:16.04 command: bash args: [-c, “while true; do sleep 1; date; done”]
  56. apiVersion: v1 kind: Pod metadata: name: manual-bash spec: containers: -

    name: bash image: ubuntu:16.04 command: bash args: [-c, “while true; do sleep 1; date; done”]
  57. apiVersion: v1 kind: Pod metadata: name: manual-bash spec: containers: -

    name: bash image: ubuntu:16.04 command: bash args: [-c, “while true; do sleep 1; date; done”]
  58. apiVersion: v1 kind: Pod metadata: name: manual-bash spec: containers: -

    name: bash image: ubuntu:16.04 command: bash args: [-c, “while true; do sleep 1; date; done”]
  59. apiVersion: v1 kind: Pod metadata: name: manual-backend labels: tier: backend

    spec: containers: - name: web image: myregistry.local/backend:0.15.9 command: /usr/bin/php-fpm
  60. apiVersion: v1 kind: Pod metadata: name: manual-backend labels: tier: backend

    spec: containers: - name: web image: myregistry.local/backend:0.15.9 command: /usr/bin/php-fpm
  61. apiVersion: v1 kind: Pod metadata: name: manual-backend labels: tier: backend

    spec: containers: - name: web image: myregistry.local/backend:0.15.9 command: /usr/bin/php-fpm
  62. 2 2 2 3 2 2 3 3 2 Current

    Ready Status Desired 3 3 3
  63. 2 2 2 3 2 2 3 3 2 3

    3 3 Current Ready Status Desired 1 3 3
  64. 2 2 2 3 2 2 3 3 2 3

    3 3 1 3 3 Current Ready Status Desired 1 3 1
  65. 2 2 2 3 2 2 3 3 2 3

    3 3 1 3 3 1 3 1 Current Ready Status Desired 1 1 1
  66. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.7 command: php-fpm
  67. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.7 command: php-fpm
  68. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.7 command: php-fpm
  69. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.7 command: php-fpm
  70. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.7 command: php-fpm
  71. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.7 command: php-fpm
  72. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.7 command: php-fpm
  73. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.7 command: php-fpm
  74. apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.7 command: php-fpm
  75. apiVersion: apps/v1beta1 kind: Deployment metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.9 command: php-fpm
  76. apiVersion: apps/v1beta1 kind: Deployment metadata: name: backend spec: replicas: 3

    selector: matchLabels: tier: backend template: metadata: labels: tier: backend spec: containers: - name: fpm image: myregistry.local/backend:0.15.9 command: php-fpm
  77. tier: backend tier: backend tier: backend tier: backend tier: backend

    tier: backend version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.7
  78. tier: backend tier: backend tier: backend tier: backend tier: backend

    tier: backend version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.9 version: 0.15.9
  79. tier: backend tier: backend tier: backend tier: backend tier: backend

    tier: backend version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.9 version: 0.15.9 tier: db tier: db tier: db tier: sidekiq
  80. tier: backend tier: backend tier: backend tier: backend tier: backend

    tier: backend version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.9 version: 0.15.9 tier: sidekiq tier: db tier: db tier: db backend tier==backend
  81. tier: db tier: sidekiq tier: db tier: db tier: backend

    tier: backend tier: backend tier: backend tier: backend tier: backend version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.9 version: 0.15.9 backend tier==backend
  82. tier: db tier: sidekiq tier: db tier: db tier: backend

    tier: backend tier: backend tier: backend tier: backend tier: backend version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.7 version: 0.15.9 version: 0.15.9 backend tier==backend
  83. tier: backend version: 0.15.7 tier: db tier: sidekiq tier: db

    tier: db tier: backend tier: backend tier: backend version: 0.15.7 version: 0.15.7 version: 0.15.7 backend tier==backend tier==backend new-backend version==0.15.9 tier: backend version: 0.15.9 tier: backend version: 0.15.9
  84. kind: Service apiVersion: v1 metadata: name: backend spec: selector: tier:

    backend ports: - protocol: TCP port: 80 targetPort: 8080
  85. kind: Service apiVersion: v1 metadata: name: backend spec: selector: tier:

    backend ports: - protocol: TCP port: 80 targetPort: 8080
  86. kind: Service apiVersion: v1 metadata: name: backend spec: selector: tier:

    backend ports: - protocol: TCP port: 80 targetPort: 8080
  87. apiVersion: batch/v1 kind: Job metadata: name: migrate spec: template: metadata:

    name: migrate spec: containers: - name: migrate image: myregistry.local/backend:0.15.9 command: [yiic, migrate] restartPolicy: Never
  88. apiVersion: batch/v1 kind: Job metadata: name: migrate spec: template: metadata:

    name: migrate spec: containers: - name: migrate image: myregistry.local/backend:0.15.9 command: [yiic, migrate] restartPolicy: Never
  89. apiVersion: batch/v1 kind: Job metadata: name: migrate spec: template: metadata:

    name: migrate spec: containers: - name: migrate image: myregistry.local/backend:0.15.9 command: [yiic, migrate] restartPolicy: Never
  90. apiVersion: batch/v2alpha1 kind: CronJob metadata: name: cron-foo spec: schedule: "*/1

    * * * *" jobTemplate: spec: template: spec: containers: - name: main image: myregistry.local/backend:0.15.9 args: [yiic, cron-foo] restartPolicy: OnFailure
  91. apiVersion: batch/v2alpha1 kind: CronJob metadata: name: cron-foo spec: schedule: "*/1

    * * * *" jobTemplate: spec: template: spec: containers: - name: main image: myregistry.local/backend:0.15.9 args: [yiic, cron-foo] restartPolicy: OnFailure
  92. apiVersion: batch/v2alpha1 kind: CronJob metadata: name: cron-foo spec: schedule: "*/1

    * * * *" jobTemplate: spec: template: spec: containers: - name: main image: myregistry.local/backend:0.15.9 args: [yiic, cron-foo] restartPolicy: OnFailure
  93. apiVersion: batch/v2alpha1 kind: CronJob metadata: name: cron-foo spec: schedule: "*/1

    * * * *" jobTemplate: spec: template: spec: containers: - name: main image: myregistry.local/backend:0.15.9 args: [yiic, cron-foo] restartPolicy: OnFailure
  94. Volume Volume Storage Class Access Type Size + + =

    ReadOnly Many ReadWrite Once ReadWrite Many
  95. Volume Volume Storage Class Access Type Size + + =

    normal slow fast Admin defined Storage Classes
  96. Volume Volume Storage Class Access Type Size + + =

    AWSElasticBlockStore GCEPersistentDisk AzureFile FC (Fibre Channel) AzureDisk FlexVolume Flocker iSCSI NFS RBD Cinder CephFS Glusterfs Quobyte Volumes VsphereVolume HostPath VMware Photon ScaleIO Volumes Portworx Volumes normal slow fast Admin defined Storage Classes
  97. Volume Volume Storage Class Access Type Size + + =

    AWSElasticBlockStore GCEPersistentDisk AzureFile FC (Fibre Channel) AzureDisk FlexVolume Flocker iSCSI NFS RBD Cinder CephFS Glusterfs Quobyte Volumes VsphereVolume HostPath VMware Photon ScaleIO Volumes Portworx Volumes normal slow fast Admin defined Storage Classes Using Interface Implementation
  98. foo bar foo N bar N Ingress foo bar Internet

    foo N bar N public ip public ip
  99. foo bar foo N bar N Ingress foo bar Internet

    foo N bar N public ip public ip Ingress
  100. foo bar foo N bar N Ingress foo bar Internet

    foo N bar N public ip public ip Ingress public ip
  101. foo bar foo N bar N Ingress foo bar Internet

    foo N bar N public ip public ip Ingress public ip Internet
  102. apiVersion: extensions/v1beta1 kind: Ingress metadata: name: main spec: rules: -

    host: foo.bar.com http: paths: - path: /assets backend: serviceName: frontend servicePort: 80 - path: / backend: serviceName: backend servicePort: 80
  103. apiVersion: extensions/v1beta1 kind: Ingress metadata: name: main spec: rules: -

    host: foo.bar.com http: paths: - path: /assets backend: serviceName: frontend servicePort: 80 - path: / backend: serviceName: backend servicePort: 80
  104. apiVersion: extensions/v1beta1 kind: Ingress metadata: name: main spec: rules: -

    host: foo.bar.com http: paths: - path: /assets backend: serviceName: frontend servicePort: 80 - path: / backend: serviceName: backend servicePort: 80
  105. apiVersion: extensions/v1beta1 kind: Ingress metadata: name: main spec: rules: -

    host: foo.bar.com http: paths: - path: /assets backend: serviceName: frontend servicePort: 80 - path: / backend: serviceName: backend servicePort: 80
  106. apiVersion: extensions/v1beta1 kind: Ingress metadata: name: main spec: rules: -

    host: foo.bar.com http: paths: - path: /assets backend: serviceName: frontend servicePort: 80 - path: / backend: serviceName: backend servicePort: 80
  107. 4. Service Discovery 1. Logging 2. Metrics 3. Supervision 6.

    (Auto) Scaling 7. CI/CD 8. Vendor lock-in Вызовы 5. Infrastructure Automation
  108. 4. Service Discovery 3. Supervision 6. (Auto) Scaling 7. CI/CD

    8. Vendor lock-in Вызовы 5. Infrastructure Automation 1. Logging 2. Metrics
  109. 4. Service Discovery 6. (Auto) Scaling 7. CI/CD 8. Vendor

    lock-in Вызовы 5. Infrastructure Automation 1. Logging 2. Metrics 3. Supervision
  110. 6. (Auto) Scaling 7. CI/CD 8. Vendor lock-in Вызовы 5.

    Infrastructure Automation 1. Logging 2. Metrics 3. Supervision 4. Service Discovery
  111. 6. (Auto) Scaling 7. CI/CD 8. Vendor lock-in Вызовы 1.

    Logging 2. Metrics 3. Supervision 4. Service Discovery 5. Infrastructure Automation
  112. 7. CI/CD 8. Vendor lock-in Вызовы 1. Logging 2. Metrics

    3. Supervision 4. Service Discovery 5. Infrastructure Automation 6. (Auto) Scaling
  113. 8. Vendor lock-in Вызовы 1. Logging 2. Metrics 3. Supervision

    4. Service Discovery 5. Infrastructure Automation 6. (Auto) Scaling 7. CI/CD
  114. Вызовы 1. Logging 2. Metrics 3. Supervision 4. Service Discovery

    5. Infrastructure Automation 6. (Auto) Scaling 7. CI/CD 8. Vendor lock-in
  115. Маленький проект на Bare metal hv-1 hv-2 hv-3 kube-master-1 kube-master-2

    kube-master-3 kube-node-1 kube-node-2 kube-node-3 kube-front-1 kube-front-2 kube-front-3
  116. Маленький проект на Bare metal hv-1 hv-2 hv-3 kube-master-1 kube-master-2

    kube-master-3 kube-node-1 kube-node-2 kube-node-3 kube-front-1 kube-front-2 kube-front-3 ... ... ...
  117. Маленький проект на Bare metal hv-1 hv-2 hv-3 kube-node-1 kube-front-1

    kube-node-2 kube-front-2 kube-node-3 kube-front-3 gitlab vpn kube-master-1 kube-master-2 kube-master-3 nfs ... ... ... ...
  118. Что мы пока не размещаем в Kubernetes? * Durable (non-shared)

    local storage management https://github.com/kubernetes/features/issues/121 1. High IO * MySQL, MongoDB, PostgreSQL, Cassandra
  119. Что мы пока не размещаем в Kubernetes? * Durable (non-shared)

    local storage management https://github.com/kubernetes/features/issues/121 1. High IO * MySQL, MongoDB, PostgreSQL, Cassandra 2. Cloud non native cluster leader election, fencing
  120. Что мы пока не размещаем в Kubernetes? * Durable (non-shared)

    local storage management https://github.com/kubernetes/features/issues/121 1. High IO * MySQL, MongoDB, PostgreSQL, Cassandra 2. Cloud non native cluster leader election, fencing … а также:
  121. Что мы пока не размещаем в Kubernetes? * Durable (non-shared)

    local storage management https://github.com/kubernetes/features/issues/121 1. High IO * MySQL, MongoDB, PostgreSQL, Cassandra 2. Cloud non native cluster leader election, fencing 3. Страх “большие” базы … а также:
  122. Что мы пока не размещаем в Kubernetes? * Durable (non-shared)

    local storage management https://github.com/kubernetes/features/issues/121 1. High IO * MySQL, MongoDB, PostgreSQL, Cassandra 2. Cloud non native cluster leader election, fencing 3. Страх “большие” базы 4. Лень VPN server, NFS server … а также:
  123. Что мы пока не размещаем в Kubernetes? * Durable (non-shared)

    local storage management https://github.com/kubernetes/features/issues/121 1. High IO * MySQL, MongoDB, PostgreSQL, Cassandra 2. Cloud non native cluster leader election, fencing 3. Страх “большие” базы 4. Лень VPN server, NFS server 5. Инерция Gitlab, Ceph OSD … а также:
  124. Как мы делаем Ingress kube-front-1 kube-front-2 kube-front-3 Nginx Ingress Controller

    Nginx Ingress Controller Nginx Ingress Controller Highly Available Public IP 3 x
  125. Как мы делаем Ingress kube-front-1 kube-front-2 kube-front-3 Nginx Ingress Controller

    Nginx Ingress Controller Nginx Ingress Controller Highly Available Public IP 3 x VRRP VRRP VRRP
  126. Как мы делаем Ingress kube-front-1 kube-front-2 kube-front-3 Nginx Ingress Controller

    Nginx Ingress Controller Nginx Ingress Controller Highly Available Public IP 3 x Pacemaker Pacemaker Pacemaker
  127. Nginx Ingress Controller Nginx Ingress Controller Nginx Ingress Controller Как

    мы делаем Ingress kube-front-1 kube-front-2 kube-front-3 Highly Available Public IP 3 x DNS Load Balancing Pacemaker Pacemaker Pacemaker
  128. foo bar baz nats mongo production staging testing foo bar

    baz nats mongo foo bar baz nats mongo foo bar baz nats mongo
  129. git build test release operate Dockerfile .kube/ backend.yaml frontend.yaml cron.yaml

    docker build Docker- image Docker registry Docker- image tests +
  130. git build test release operate Dockerfile .kube/ backend.yaml frontend.yaml cron.yaml

    docker build Docker- image Docker registry Docker- image tests + kubectl
  131. git build test release operate Dockerfile .kube/ backend.yaml frontend.yaml cron.yaml

    docker build Docker- image Docker registry Docker- image tests + kubectl
  132. .kube/ backend.yaml frontend.yaml cron.yaml Docker- image Docker registry Docker- image

    tests + kubectl git build test release operate Dockerfile docker build
  133. .kube/ backend.yaml frontend.yaml cron.yaml Docker- image Docker registry Docker- image

    tests + kubectl git build test release operate Dappfile build
  134. Docker- image Docker registry Docker- image tests + git build

    test release operate Dappfile .kube/ backend.yaml frontend.yaml cron.yaml kubectl build
  135. Docker- image Docker registry Docker- image tests + git build

    test release operate Dappfile .kube/ backend.yaml frontend.yaml cron.yaml build
  136. Docker- image Docker registry Docker- image tests + git build

    test release operate Dappfile .kube/ backend.yaml frontend.yaml cron.yaml deploy build
  137. Мы хотим сделать dapp действительно крутым и полезным Open Source-решением

    Нам нужен ВАШ опыт использования Будем рады любой помощи Поставьте звёздочку ;) Обещаем очень быстро отвечать на все issues и очень быстро исправлять все баги. Для нас dapp — это приоритетный проект. Если есть желание помочь с переводом документации на английский или с её доработкой, да или вообще помочь — будем очень рады и ждем pull-реквесты. Мы старались. github.com/flant/dapp
  138. Highly Available VM IOPS VM Frontend DB Backend memcached Cron

    Было Стало Storage Ceph AWS GCE
  139. Highly Available VM IOPS VM Frontend DB Backend memcached Cron

    Было Стало backend 3 Storage Ceph AWS GCE
  140. Highly Available VM IOPS VM Frontend DB Backend memcached Cron

    Было Стало backend 3 DB Storage Ceph AWS GCE
  141. Highly Available VM IOPS VM Frontend DB Backend memcached Cron

    Было Стало backend 3 DB cron-foo cron-bar cron-baz Storage Ceph AWS GCE
  142. Highly Available VM IOPS VM Frontend DB Backend memcached Cron

    Было Стало backend 3 DB cron-foo cron-bar cron-baz frontend Storage Ceph AWS GCE
  143. Highly Available VM IOPS VM Frontend DB Backend memcached Cron

    Было Стало backend 3 DB cron-foo cron-bar cron-baz frontend memcached 3 Storage Ceph AWS GCE
  144. Highly Available VM IOPS VM DB frontend backend 3 memcached

    3 cron-foo cron-bar cron-baz Frontend DB Backend memcached Cron Было Стало Files Storage Ceph AWS GCE
  145. Highly Available VM IOPS VM Storage Ceph AWS GCE DB

    frontend backend 3 memcached 3 cron-foo cron-bar cron-baz Frontend DB Backend memcached Cron Было Стало Files Background Jobs Redis Redis 3 Background Jobs 3
  146. Highly Available VM IOPS VM DB frontend backend 3 memcached

    3 cron-foo cron-bar cron-baz Frontend DB Backend memcached Cron Было Стало Files Background Jobs Redis Redis 3 Background Jobs 3 Sphinx 2 Sphinx Storage Ceph AWS GCE
  147. Highly Available VM IOPS VM frontend backend 3 memcached 3

    cron-foo cron-bar cron-baz Frontend DB Backend memcached Cron Было Стало Files Background Jobs Redis Redis 3 Background Jobs 3 Sphinx 2 Sphinx Storage Ceph AWS GCE DB 3
  148. Наш блог на Хабрахабре habrahabr.ru/company/flant/ Тут мы рассказываем о нашем

    опыте и актуальных технологиях. Подписывайтесь, чтобы быть в курсе!