data management in kubernetes using kanister
play

Data Management in Kubernetes Using Kanister T om Manville | April - PowerPoint PPT Presentation

Data Management in Kubernetes Using Kanister T om Manville | April 25th, 2018 2 3 4 yes* 5 Database Operations in Kubernetes kanister.io 6 Agenda Background DB in a container DB in Kubernetes Kanister Use


  1. Data Management in Kubernetes Using Kanister T om Manville | April 25th, 2018

  2. 2

  3. 3

  4. 4

  5. yes* 5

  6. Database Operations in Kubernetes kanister.io 6

  7. Agenda • Background • DB in a container • DB in Kubernetes • Kanister • Use Cases • Components • Walkthrough • Demo 7

  8. whoami 8

  9. DB in a Container $ docker run -d \ percona/percona-server:5.7 9

  10. DB in a Container $ docker run -d \ – v /local/datadir:/var/lib/mysql \ percona/percona-server:5.7 10

  11. Cloud Native • Container Package • Dynamically Managed • Micro-Services Oriented 11

  12. 12

  13. 13

  14. 14

  15. Requirements https://kubernetes.io/ https://www.helm.sh/ https://github.com/kubernetes/kubernetes https://github.com/kubernetes/helm 15

  16. DB in Kubernetes $ helm install stable/percona 16

  17. Application Centric Use Cases • Portability between cloud providers • Testing on real data • Filtering • Masking • Backup/Recover • Distributed point-in-time consistency • Incremental backups 17

  18. Install Kanister $ helm install stable/kanister-operator $ helm repo add kanister http://charts.kanister.io 18

  19. Kanister DB Charts $ helm install kanister/kanister-mysql \ --set kanister.s3_bucket="mysql-backup-bucket" \ --set kanister.s3_api_key="${AWS_ACCESS_KEY_ID}" \ --set kanister.s3_api_secret="${AWS_SECRET_ACCESS_KEY}" \ 19

  20. Kanister Components API Objects Controller • • Watches for new API objects ActionSet • • Launches actions Blueprints • • Profiles (coming soon!) Creates events / logs status • Locations • Credentials 20

  21. Controller Database Blueprint 21

  22. CLI Controller Database Blueprint 22

  23. CLI Controller ActionSet Database Blueprint 23

  24. CLI Controller ActionSet Database Blueprint 24

  25. CLI Controller ActionSet Database Blueprint 25

  26. CLI Controller ActionSet Database Action Blueprint 26

  27. CLI Controller ActionSet Database Action Blueprint 27

  28. CLI Controller ActionSet Database Action Blueprint 28

  29. Demos Click to add text

  30. An Abridged ActionSet spec: actions: - name: backup blueprint: mysql-blueprint object: kind: Deployment name: mysql-sakila namespace: video-store-app status: ... 30

  31. Blueprint: Backup backup: phases: - func: KubeExec args: - "{{ .Deployment.Namespace }}" - "{{ index .Deployment.Pods 0 }}" - kanister-sidecar - bash - -c - | s3_path="s3://${S3_BUCKET}/{{ .ArtifactsOut.mysqlCloudDump.path }}" s3_cmd=(aws "${S3_VERIFY_SSL}" s3 cp - "${s3_path}") mysqldump --password="${MYSQL_ROOT_PASSWORD}" | gzip - | ${s3_cmd[@]} 31

  32. Blueprint: Restore restore : phases: - func: KubeExec args: - "{{ .Deployment.Namespace }}" - "{{ index .Deployment.Pods 0 }}" - kanister-sidecar - bash - -c - | s3_path="s3://${S3_BUCKET}/{{ .ArtifactsIn.mysqlCloudDump.path }}" s3_cmd=(aws "${S3_VERIFY_SSL}" s3 cp "${s3_path}" - ) ${s3_cmd[@]} | gunzip -c - | mysql --password="${MYSQL_ROOT_PWD}" 32

  33. Chaining ActionSets $ kanctl perform restore --from backup-mysql-04-23 33

  34. Database Operations in Kubernetes kanister.io 34

  35. Try Kanister Today! • Site: https://kanister.io/ • Github: https://github.com/kanisterio/kanister • Docs: https://docs.kanister.io/ • Slack: https://kasten.typeform.com/to/QBcw8T 35

  36. Backup Slides Click to add text

  37. 37

  38. 38

  39. 39

  40. Common Databases 40

  41. 41

  42. 42

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend