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

Kubernetes in Startups vs Enterprise: Using Custom Resources to extend workflow

spiddy
July 19, 2018

Kubernetes in Startups vs Enterprise: Using Custom Resources to extend workflow

Kubernetes and Containers are taking over the world and it seems that is they fit in every use-case from a small startup to big bank industries. But in reality every environment is unique with it´s own peculiarities. Kubernetes is not the end-game, it´s the platform for platforms. During this talk we´ll discuss about the differences between startups and enterprises and how we can fill the gap integrating inside Kubernetes our custom workflow using Custom Resources and Operators.

We´ll do a demo of a Project entity that helps provision namespaces and grants user access to team members. CRDs are a powerful tool for Kubernetes extensibility but with great power comes great responsibility.

spiddy

July 19, 2018
Tweet

More Decks by spiddy

Other Decks in Programming

Transcript

  1. @spiddy
    Kubernetes in
    Startups vs Enterprise
    Using Custom Resources to extend workflow
    By Dimitris Kapanidis

    View Slide

  2. @spiddy
    About me
    Docker Captain | Google Developer Expert
    Docker BCN | Kubernetes BCN
    Meetup Organizer
    Consulting @
    Harbur Cloud Solutions
    2

    View Slide

  3. @spiddy
    Startups vs Enterprise
    Where does Kubernetes fits?
    3

    View Slide

  4. @spiddy
    The Container revolution is here
    4

    View Slide

  5. @spiddy
    The Container revolution is here
    ● Decoupling of development / deployment environment
    ● Standard packaging format
    ● The Twelve-Factor App implementation
    ● Microservice design
    5

    View Slide

  6. @spiddy
    The evolution of IT industry
    6

    View Slide

  7. @spiddy
    Waterfall vs Agile
    7

    View Slide

  8. @spiddy
    The Waterfall Model
    8
    “The waterfall model is a linear sequential
    (non-iterative) design approach for software
    development, in which progress flows in one
    direction downwards (like a waterfall) through
    the phases of conception, initiation, analysis,
    design, construction, testing, deployment and
    maintenance”

    View Slide

  9. @spiddy 9
    Waterfall Origins on Construction

    View Slide

  10. @spiddy 10
    Waterfall Origins on Manufacturing

    View Slide

  11. @spiddy 11
    Requirements
    Design
    Implementation
    Verification
    Maintenance
    Waterfall on IT

    View Slide

  12. @spiddy
    Waterfall on IT
    12

    View Slide

  13. @spiddy
    The Agile Model
    13
    “Agile software development describes a set of
    values and principles for software development
    under which requirements and solutions evolve
    through the collaborative effort of self-organizing
    cross-functional teams“

    View Slide

  14. @spiddy
    Agile Manifesto Values
    ● Individuals and Interactions over Processes and Tools
    ● Working Software over Comprehensive Documentation
    ● Customer Collaboration over Contract Negotiation
    ● Responding to Change over Following a Plan
    14

    View Slide

  15. @spiddy
    Agile Model vs Waterfall
    15

    View Slide

  16. @spiddy
    Agile Examples on IT
    16

    View Slide

  17. @spiddy
    Monolithic vs Microservices
    17

    View Slide

  18. @spiddy
    Monolithic Architecture
    18
    “A software system is called "MONOLITHIC" if it has
    a monolithic architecture, in which functionally
    distinguishable aspects are all interwoven, rather
    than containing architecturally separate components.“

    View Slide

  19. @spiddy
    Traditional
    Architecture
    19

    View Slide

  20. @spiddy 20
    Design up front

    View Slide

  21. @spiddy
    Over Allocation of Infrastructure
    21

    View Slide

  22. @spiddy 22
    Physical Separation

    View Slide

  23. @spiddy 23
    Monolithic Design

    View Slide

  24. @spiddy
    Traditional Architecture
    Internal Network
    Load Balancers
    Legend
    Server
    Connection
    Database
    Client
    24

    View Slide

  25. @spiddy 25

    View Slide

  26. @spiddy
    Monolithic Architecture Issues
    ● Cannot scale-out individually each function
    ● Cannot do easily rollback of version upgrade
    ● Adding a function forces complete rollout
    ● Cannot easily do A/B test of a function
    26

    View Slide

  27. @spiddy
    Microservices Architecture
    27

    View Slide

  28. @spiddy
    Modern Architecture
    - Design Minimal Viable Product
    - Design process embraces changes
    - Easily Scalable Infrastructure
    - No Physical boundaries (Zero Trust Network)
    - Infrastructure as Code
    - Microservice-Oriented Design
    28

    View Slide

  29. @spiddy
    Microservices Architecture
    29

    View Slide

  30. @spiddy 30

    View Slide

  31. @spiddy
    Bare Metal
    vs
    Virtualization
    vs
    Containers
    31

    View Slide

  32. @spiddy 32
    Bare-Metal

    View Slide

  33. @spiddy 33
    Virtual Machines

    View Slide

  34. @spiddy 34
    Containers

    View Slide

  35. @spiddy 35
    Bare Metal / Virtualization / Containers

    View Slide

  36. @spiddy
    On Premise
    vs
    Cloud
    36

    View Slide

  37. @spiddy 37

    View Slide

  38. @spiddy 38

    View Slide

  39. @spiddy
    Why is Kubernetes
    so damn difficult?
    39

    View Slide

  40. @spiddy 40
    Kubernetes orchestrates Containers

    View Slide

  41. @spiddy 41
    Containers are ephemeral by design
    Kubernetes orchestrates Containers

    View Slide

  42. @spiddy 42
    Containers can scale +/- on demand
    Containers are ephemeral by design
    Kubernetes orchestrates Containers

    View Slide

  43. @spiddy 43
    Kubernetes implements Microservices
    Containers can scale +/- on demand
    Containers are ephemeral by design
    Kubernetes orchestrates Containers

    View Slide

  44. @spiddy 44
    Microservices imply a distributed system
    Kubernetes implements Microservices
    Containers can scale +/- on demand
    Containers are ephemeral by design
    Kubernetes orchestrates Containers

    View Slide

  45. @spiddy 45
    Distributed systems are intrinsically difficult
    Microservices imply a distributed system
    Kubernetes implements Microservices
    Containers can scale +/- on demand
    Containers are ephemeral by design

    View Slide

  46. @spiddy
    But there are good news
    46

    View Slide

  47. @spiddy 47
    Kubernetes...
    architecture is simple

    View Slide

  48. @spiddy
    Kubernetes...
    follows the single responsibility principle
    48

    View Slide

  49. @spiddy
    Kubernetes...
    facilitates separation of concerns
    49

    View Slide

  50. @spiddy
    Kubernetes...
    abstracts away cloud vendor details
    50

    View Slide

  51. @spiddy
    Kubernetes...
    is the defacto standard for container ops
    51

    View Slide

  52. @spiddy
    Kubernetes...
    learn once deploy anywhere
    52

    View Slide

  53. @spiddy
    Kubernetes...
    is extendable
    53

    View Slide

  54. @spiddy
    Startups vs Enterprise
    Where does Kubernetes fits?
    54

    View Slide

  55. @spiddy
    Startup environment
    ● Start from scratch, no legacy code, no migration process
    ● Small organization
    ● Flat organization chart
    ● Agile oriented
    ● Microservice oriented
    55

    View Slide

  56. @spiddy
    Startup too small for Kubernetes?
    ● Kubernetes has steep learning curve
    ● Kubernetes is focused on automation of CI/CD
    ● Kubernetes is compatible with DevOps
    ● Kubernetes is designed to provide resilience, redundancy and high availability
    ● Kubernetes is designed to run on multiple nodes
    56

    View Slide

  57. @spiddy
    When not to use Kubernetes...
    57
    When your production should run on just one node

    View Slide

  58. @spiddy
    When not to use Kubernetes...
    58
    When your org is less than 8 people

    View Slide

  59. @spiddy
    When not to use Kubernetes...
    59
    When maintenance downtime is not an issue (yet)

    View Slide

  60. @spiddy
    When not to use Kubernetes...
    60
    When automation is not a priority (yet)

    View Slide

  61. @spiddy
    Enterprise environment
    ● Legacy code, migration process is needed
    ● Big organization
    ● Hierarchical organization chart
    ● Waterfall oriented
    ● Monolithic oriented
    61

    View Slide

  62. @spiddy
    Kubernetes on Enterprise
    ● Multiple clusters are needed to support HA on multiple datacenters
    ● Container Images promotion process
    ○ Vulnerability scanning from security team
    ● Networking is hardened
    ○ Connection to Internet is restricted/limited
    ○ Network isolation per Namespace
    ● Assets are provisioned
    ○ Using LimitRanges & ResourceQuotas
    ● Pods are hardened
    ○ Using PodSecurityPolicies
    ● Multiple teams need access to clusters
    ○ Each team can manage their own resources
    62

    View Slide

  63. @spiddy
    Using Custom Resources
    to extend workflow
    63

    View Slide

  64. @spiddy
    Multiple teams need access to clusters
    ● Teams can create projects with their own namespaces (dev, pre, pro)
    ● They can assign project members
    ● They can grant rolebindings to project members
    64

    View Slide

  65. @spiddy
    Project Initializer - The Cloud Native way
    65

    View Slide

  66. @spiddy 66
    https://github.com/harbur/kubernetes-project-initializer-tutorial/

    View Slide

  67. Thank You!
    Innovating Container Delivery

    View Slide

  68. @spiddy
    Thank you
    68

    View Slide