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

Higher level abstraction/orchestration with Crossplane and Open Application Model

mita
March 07, 2021

Higher level abstraction/orchestration with Crossplane and Open Application Model

Higher level abstraction/orchestration with Crossplane
and Open Application Model at CNDO Spring 2020.

mita

March 07, 2021
Tweet

More Decks by mita

Other Decks in Technology

Transcript

  1. Higher level abstraction/orchestration
    with Crossplane


    and Open Application Model

    View Slide

  2. Name: mita

    Role: Infrastructure Engineer

    Interest:

    - Improving Operator Experience

    - Cloud Native

    - KRM Ecosystems

    - Kubernetes Operators

    - Observability

    - Chaos Engineering

    - Infrastructure as Code

    View Slide

  3. Cognitive load


    ೝ஌ෛՙ
    🤯

    View Slide

  4. View Slide

  5. 🤯
    ֶश଎౓
    <
    ֶͿίτ͕
    ૿͑Δ଎౓
    Computer Science, Programming Languages,
    Frameworks, Cloud Native, Observability,


    Container, Container Security, Cloud, Edge, IaC,
    Machine Learning, DevOps, Chaos Engineering,
    Service Mesh, WASM and eBPF, etc…

    View Slide

  6. 🤯
    ֶश଎౓
    <
    ֶͿίτ͕
    ૿͑Δ଎౓
    ͋͋͋͋͋͋͋͋͋͋͋


    ೝ஌ෛՙߴ͗͢
    Computer Science, Programming Languages,
    Frameworks, Cloud Native, Observability,


    Container, Container Security, Cloud, Edge, IaC,
    Machine Learning, DevOps, Chaos Engineering,
    Service Mesh, WASM and eBPF, etc…

    View Slide

  7. Kubernetes ecosystem

    View Slide

  8. # of App developed

    View Slide

  9. Higher level abstraction/orchestration
    with Crossplane


    and Open Application Model
    ʹͯೝ஌ෛՙΛԼ͛ຊ࣭తͳ࡞ۀʹ஫ྗ͍ͨ͠

    View Slide

  10. Cloud Native and Kubernetes

    View Slide

  11. What’s Kubernetes

    View Slide

  12. What’s Kubernetes

    View Slide

  13. Kubernetes’s true power[1]
    KRM[2]͸ίϯςφઐ༻Ͱ͸ͳ
    ͍

    CRDΛϑϨʔϜϫʔΫͱͯ͠༻
    ͍Δ͜ͱͰKRM APIΛ֦ுՄೳ

    KRMΛඪ४తͳσʔλϞσϧ
    ͱͯ͠ѻ͏ΤίγεςϜ͕୆಄

    View Slide

  14. KRM ecosystem[3]
    KRM(Kubernetes Resource Model)
    Tool A Tool B Tool C Tool D
    Controller A Controller B Controller C Controller D
    Tool A Tool B Tool C Tool D
    API 1 API 2 API 3 API 4
    Kubernetes API
    API Call
    Interoperable Ecosystem with KRM
    Tightly coupled system
    🤔 😊

    View Slide

  15. Abstraction


    ந৅Խ

    View Slide

  16. View Slide

  17. Software, Orchestrator
    Alphabet, Character
    Food Bird, Creatures

    View Slide

  18. Software, Orchestrator
    Alphabet, Character
    Food Bird, Creatures
    Pattern and Abstraction

    View Slide

  19. Software, Orchestrator
    Alphabet, Character
    Food Bird, Creatures
    Pattern and Abstraction
    “ਓ͸ύλʔϯԽ͢ΔຊೳΛ͍࣋ͬͯΔ”


    ιϑτ΢ΣΞͷྺ࢙΋ྫ֎Ͱ͸ͳ͍

    View Slide

  20. History of Software ≒ Abstraction[4]
    “ιϑτ΢ΣΞͷྺ࢙͸ɺ
    ͻͱͭͷந৅ͷ্ʹ͞Βʹ࣍ͷந৅Λ
    ॏͶ͍ͯ͘͜ͱͩͬͨ”

    View Slide

  21. Separation of Concerns


    ؔ৺ͷ෼཭

    View Slide

  22. Έͳ͞Μ͸ԿͷΤϯδχΞͰ͔͢ʁ
    ಥવͰ͕͢…

    View Slide

  23. XXXX Engineers
    ͕ΞϓϦέʔγϣϯͷ։ൃΛߦ͍ɺΞϓϦͷӡ༻্ͷಛੑΛఆٛ͢Δ
    ͕ΞϓϦέʔγϣϯͷӡ༻ཁ݅Λຬͨ͢Α͏ͳΠϯϑϥΛબఆ͠؀ڥͷ؅ཧ౳Λߦ͏
    ͕ΦϯϓϨɺΫϥ΢υɺΤοδɺKubernetesͳͲΠϯϑϥ෦෼ͷఏڙͱ؅ཧΛߦ͏
    ?
    ?
    ?
    ? ? ?

    View Slide

  24. XXXX Engineers
    ͕ΞϓϦέʔγϣϯͷ։ൃΛߦ͍ɺΞϓϦͷӡ༻্ͷಛੑΛఆٛ͢Δ
    ͕ΞϓϦέʔγϣϯͷӡ༻ཁ݅Λຬͨ͢Α͏ͳΠϯϑϥΛબఆ͠؀ڥͷ؅ཧ౳Λߦ͏
    ͕ΦϯϓϨɺΫϥ΢υɺΤοδɺKubernetesͳͲΠϯϑϥ෦෼ͷఏڙͱ؅ཧΛߦ͏
    Application Dev
    Application Ops
    Infrastructure Ops
    Application Dev Application Ops Infrastructure Ops

    View Slide

  25. શ෦Զ
    ͕ΞϓϦέʔγϣϯͷ։ൃΛߦ͍ɺΞϓϦͷӡ༻্ͷಛੑΛఆٛ͢Δ
    ͕ΞϓϦέʔγϣϯͷӡ༻ཁ݅Λຬͨ͢Α͏ͳΠϯϑϥΛબఆ͠؀ڥͷ؅ཧ౳Λߦ͏
    ͕ΦϯϓϨɺΫϥ΢υɺΤοδɺKubernetesͳͲΠϯϑϥ෦෼ͷఏڙͱ؅ཧΛߦ͏
    Զ
    Զ
    Զ
    Զ Զ Զ

    View Slide

  26. Platform Model for


    Separation of Concerns
    • DevOpsΛεέʔϧͤ͞ΔͨΊͷΞϓϩʔνͱͯ͠ɺ

    ”The 2020 State of DevOps Report “[5]ʹͯ঺հ͞Ε͍ͯΔ

    • Platform Model: ։ൃνʔϜ޲͚ʹɺΠϯϑϥ΍؀ڥͷ੔උɺσϓϩΠϝ
    ϯτύΠϓϥΠϯͳͲΛ༻ҙ͢ΔPlatform teamΛ༻ҙ͢Δ͜ͱͰΞϓϦ
    ։ൃΛՃ଎ͤͨ͞Γɺؔ৺ͷ෼཭Λߦ͑Δ

    • େ͖͘੒௕͍ͯ͠Δاۀͷଟ͘͸ɺ૊৫಺PlatformΛ׆༻͍ͯ͠Δ

    View Slide

  27. Summary of Background
    • Ϋϥ΢υΑΓߴ࣍ϨΠϠʹ͓͚Δந৅Խ: Crossplane
    • ΞϓϦͷந৅Խͱؔ৺ͷ෼཭: OAM(Open Application Model)
    Ϋϥ΢υωΠςΟϒͷจ຺Ͱࠓޙ·͢·͢γεςϜ͕ߴ౓Խ͍ͯͨ͘͠Ίɺ
    ந৅Խ΍ؔ৺ͷ෼཭Λߦ͏͜ͱͰೝ஌ෛՙΛԼ͍͛ͨ

    View Slide

  28. Crossplane

    View Slide

  29. Crossplane is an
    Orchestration &
    Management tool for what?

    View Slide

  30. Orchestrate any infrastructure

    View Slide

  31. Build your own platform with providers

    View Slide

  32. Crossplane
    • Launched in Dec 2018, by the creators of Rook

    (CNCF graduated project) released v1.0 in Dec 2020. 🎉

    • Open source & Open governance with CNCF

    • Based on Kubernetes control plane

    • 3 main feature areas

    ◦ Provision infrastructure declaratively using the Kubernetes API

    ◦ O
    ff
    er your own declarative infrastructure APIs for teams to use

    ◦ Run and deploy applications alongside infrastructure


    View Slide

  33. Crossplane
    fl
    ow
    AWS
    Azure
    GCP
    Cloud/Service Providers
    provider-aws
    Any providers
    Custom Resource/
    Composite Resource
    api-server
    3. Reconcile
    through
    AWS API
    provider-gcp
    provider-azure
    2. watch desired states
    1. Apply manifests
    Kubernetes

    View Slide

  34. Crossplane Demo 1:


    Manage RDS through k8s API

    View Slide

  35. Manage RDS through k8s API
    AWS
    Azure
    GCP
    Cloud/Service Providers
    provider-aws
    Any providers
    Custom Resource/
    Composite Resource
    api-server
    3. Reconcile
    through
    AWS API
    provider-gcp
    provider-azure
    2. watch desired states
    1. Apply manifests
    Kubernetes

    View Slide

  36. Demo Session
    σϞ͢ΔΑ

    View Slide

  37. Crossplane Demo 2:


    Interoperability of KRM

    View Slide

  38. Interoperability of KRM
    KRM(Kubernetes Resource Model)
    kubectl
    provider-
    aws
    provider-
    gcp
    provider-
    azure
    Crossplane
    Kubernetes API
    Interoperable Ecosystem with KRM
    😊
    Terraform
    Kubernetes provider
    for Terraform(Alpha)

    View Slide

  39. Interoperability of KRM
    AWS
    Azure
    GCP
    Cloud/Service Providers
    provider-aws
    Any providers
    api-server
    3. Reconcile
    through
    AWS API
    provider-gcp
    provider-azure
    2. watch desired states
    Kubernetes
    Terraform
    Kubernetes provider
    for Terraform(Alpha)
    1.3. Apply manifests
    1.1. Apply manifests

    written in HCL
    1.2. Convert HCL to KRM

    View Slide

  40. Demo Session
    σϞ͢ΔΑ

    View Slide

  41. Crossplane Components

    and Architecture[6]
    ※࣌ؒͷ౎߹্εΩοϓ

    View Slide

  42. OAM


    (Open Application Model)

    View Slide

  43. OAM:


    Platform agnostic application model
    • ʮΞϓϦέʔγϣϯ͕ͲͷϓϥοτϑΥʔϜʹσϓϩΠ͞ΕΔ͔

    Λҙࣝ͠ͳͯ͘Α͍ʯΞϓϦέʔγϣϯϞσϧ

    • MicrosoftͱAlibaba Cloud͕2019೥ʹOpen Web Foundation഑ԼͰൃද[8]

    • ݱঢ়ɺv0.1ͱv0.2ͱ͍͏ҟͳΔspec͕ଘࡏ

    • v0.2͔ΒKRMʹରԠ[7]

    • ΞϓϦ։ൃऀɺΞϓϦӡ༻ऀɺΠϯϑϥӡ༻ऀͷ໾ׂΛ໌֬ʹ෼཭
    🎉

    View Slide

  44. OAM Implementations
    • Rudr: Implementation of OAM spec v0.1.0(previously named v1.0.0-alpha1 release)

    • Kubevera: Implementation of OAM spec v.0.2.0

    • EDAS(Enterprise Distributed Application Service)

    View Slide

  45. Separation of Concerns
    Providing Applications


    and describing


    Operational Characteristics
    Traf
    fi
    c Mgmt, Deploy Policy,
    Auto-scaling, Identity Mgmt,
    Recovery…
    Infrastructure Capabilities:

    On-premise? Cloud?


    Edge? Kubernetes?
    Application Dev Application Ops Infrastructure Ops

    View Slide

  46. Separation of Concerns
    ΞϓϦέʔγϣϯࣗମͱ
    ͦͷӡ༻্ͷಛੑʹؔ৺
    ͲͷΑ͏ʹΞϓϦέʔγϣϯ܈͕
    ӡ༻ཁ݅Λຬ͔ͨ͢ʹؔ৺
    ૊৫શମͷΠϯϑϥ͕ͲͷΑ͏ʹ
    ؅ཧ͞ΕΔ͔ͳͲͷશମ૾ʹؔ৺
    Application Dev Application Ops Infrastructure Ops

    View Slide

  47. Area of Concerns[8]

    View Slide

  48. Area of Concerns
    Application=Componentes

    Application ScopeʹΑͬͯෳ਺
    ͷComponentΛάϧʔϐϯά

    View Slide

  49. Area of Concerns
    Πϯϑϥͷ࣋ͭಛੑΛTraitsͱ
    ͯ͠ఆٛ͠ParametersʹͯՄม
    ʹ͢Δ

    Traits:

    • Tra
    ffi
    c Mgmt

    • Deploy Policy

    • Auto-scaling

    • Identity Mgmt

    • Recovery

    • etc

    View Slide

  50. Area of Concerns
    ApplicationͱTraitsͷܨ͗ࠐΈ
    ΛApplication Con
    fi
    gurationʹ
    هࡌͯ͠ରԠ෇͚

    View Slide

  51. How great OAM is
    ΞϓϦपΓͷΈʹूதͰ͖Δɻ
    KubernetesͳͲPlatformपΓΛ
    ஌Βͳͯ͘ྑ͍
    Traitsͷத͔Βඞཁͳӡ༻ಛੑΛ
    બ୒ͯ͠ద༻Ͱ͖Δ
    Traits୯ҐͰӡ༻্ͷCapability
    ΛఆٛͰ͖Δɻ
    ΞϓϦपΓݟͳ͍͍ͯ͘
    Application Dev Application Ops Infrastructure Ops

    View Slide

  52. How Crossplane and OAM
    collaborate

    View Slide

  53. Towards standard k8s app model[9]
    • Deploy K8s app with cloud service - entirely from k8s API

    View Slide

  54. OAM & Crossplane Composition[10]

    View Slide

  55. History of


    Crossplane and OAM

    View Slide

  56. History of OAM & Crossplane
    Microsoft and Alibaba Cloud
    Announce OAM v0.1 & Rudr
    Oct 2019[12]
    Microsoft and Alibaba Cloud
    Join Crossplane community
    May 2020[13]
    Rook creators
    launch Crossplane[11]
    Dec 2018
    Rudr deprecation[14]
    And OAM v0.2 release
    Rudr’s succesor
    KubeVela 1.0
    March 2021
    Crossplane 1.0
    Dec 2020
    Crossplane adopt OAM
    at Crossplane v0.11
    May 2020
    🎉 🎉
    🎉

    View Slide

  57. Key takeaway
    • CrossplaneͱOAMͷ֓ཁͱղܾ͢Δ՝୊ͷཧղ

    • CrossplaneʹΑͬͯɺΫϥ΢υ/αʔϏεϓϩόΠμͷҰஈ্ʹ

    ಠࣗͷந৅ԽϨΠϠ/ϓϥοτϑΥʔϜΛߏங

    • OAMʹΑͬͯந৅Խͱؔ৺ͷ෼཭Λߦ͏͜ͱͰPlatform ModelΛ

    ࣮ݱ͠DevOpsʹڧ͍૊৫࡞ΓΛଅਐ

    • Production ReadyͳCrossplaneͱOAMʹΑΔߴ࣍ͷந৅Խ͕

    KRMͷΤίγεςϜͰ࣮ݱ͞Εඪ४Խ͕ਐΉ͜ͱͷ঺հ

    View Slide

  58. Higher level abstraction/orchestration
    with Crossplane


    and Open Application Model

    View Slide

  59. 3rd Crossplane Community Day
    Third Crossplane community day:
    KubeCon EU co-located event will be held in May 4, 2021[15]
    2nd Crossplane
    Community Day[16]

    View Slide

  60. References
    • [1] Infrastructure as Code ――Ϋϥ΢υʹ͓͚Δαʔό؅ཧͷݪଇͱϓϥΫςΟε: https://www.oreilly.co.jp/books/
    9784873117966/

    • [2] Cloud Native Ecosystemͷ੒ख़౓͔ΒݟΔ2021೥ͷಈ޲: https://qiita.com/iaoiui/items/6e1293d656735b062ed2

    • [3] CNCF Cloud Native Landscape: https://landscape.cncf.io

    • [4] Crossplane: https://crossplane.io

    • [5] https://puppet.com/resources/report/2020-state-of-devops-report/

    • [6] https://zenn.dev/iaoiui/articles/fd8417b9fba25ad29e8f

    • [7] https://github.com/oam-dev/spec/blob/master/SPEC.md#versioning

    • [8] https://azure.microsoft.com/en-us/resources/videos/ignite-2019-mark-russinovich-presents-the-future-of-cloud-
    native-applications-with-oam-and-dapr/

    View Slide

  61. References
    • [9] https://sched.co/ZelS

    • [10] https://docs.google.com/presentation/d/1PxZweRpB6HElxd9qGK1McboGZ1kluCDCS5qxgYnX5f0/
    edit#slide=id.g536db6d9f2_0_86

    • [11] Crossplane CNCF Project Overview: https://docs.google.com/presentation/d/
    1PxZweRpB6HElxd9qGK1McboGZ1kluCDCS5qxgYnX5f0/edit#slide=id.g9303db1085_1_55

    • [12] https://cloudblogs.microsoft.com/opensource/2019/10/16/announcing-open-application-model/

    • [13]https://blog.crossplane.io/welcome-microsoft-and-alibaba-to-the-crossplane-community/

    • [14]https://github.com/oam-dev/rudr/issues/559

    • [15]Crossplane community day 2020: https://events.crossplane.io/crossplane-community-day-modernizing-with-api-centric-
    control-plane-post

    • [16]Crossplane community day 2021: https://events.linuxfoundation.org/crossplane-community-day-europe/

    View Slide

  62. References
    • https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/
    resource-management.md

    • Growth and Design Patterns in the KRM API Ecosystem: https://static.sched.com/hosted_
    fi
    les/
    kccncna19/5e/eric-tune-kcon-slides-
    fi
    nal.pdf

    • Kubevela: https://github.com/oam-dev/kubevela

    • https://static.sched.com/hosted_
    fi
    les/kccncna19/5e/eric-tune-kcon-slides-
    fi
    nal.pdf

    • Kubernetes as a Framework for Control Planes featuring Brian Grant, Google: https://blog.upbound.io/how-the-
    kubernetes-resource-model-enables-con
    fi
    guration-as-data/

    View Slide