Skip to content

AugustasV/crossplane-workshop2023

 
 

Repository files navigation

Crossplane Workshop

Hi 👋

Welcome to the Crossplane workshop

Your hosts are

Robert Japs

Erkan Yanar

blabla Robert

blabla Erkan

Disclaimer

Both of us don’t work or are associated to the company behind Crossplane

Prerequisites

Let’s make sure we’ve got everything.

  • You need (cluster-admin) access to a K8s cluster

  • A local one like kind, k3d, Docker Destop etc. works

  • ☝️ If you just want to listen, that’s fine too ☝️

  • ☝️ Just keep in mind we got some HandsOn stuff ☝️

Binaries you need

  • kubectl

  • git

  • helm

Cloud Credentials

  • Credentials for AWS

  • ☝️ This ist also optional, as we repeat only stuff we did with our local Kubernetes resources ☝️

Let’s socialize

  • Why are you here?

  • What do you expect?

And our plan is:

  • Introduction

  • Concepts

  • HandsOn

  • Monitoring

  • Benefits

  • Drawbacks

Cloudresources

  • We start using K8s itself as a resource

  • It cumulates in using AWS

  • There will be an Digitalocean example also

Introduction Crossplane

The cloud native control plane framework

Installing Crossplane

We just use Helm to install the framework:

kubectl api-resources --api-group=apiextensions.crossplane.io
helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update
helm upgrade --install crossplane --create-namespace \
    -n crossplane-system --set metrics.enabled=true \
    crossplane-stable/crossplane --wait
kubectl api-resources --api-group=apiextensions.crossplane.io

Nice ShortCuts

  • Get all Crossplane related Resources

  • Yes Crossplane creates Categories

  • As with kubectl get all

kubectl get crossplane
  • Get all managed resources

  • Should be empty

kubectl get managed

Categories?

  • Check other Categories

:)

kubectl get crd -o custom-columns=NAME:.metadata.name,CATEGORIES:.spec.names.categories

The Cloud Native Control Plane Framework

  • The cloud native control plane framework

  • Universal control plane

Control Plane?

  • We know control planes

  • Hey we know Kubernetes, so yes we know

  • It is about managing "cloud" resources

  • More precise:

    • It is about managing any resource behind an API

much more

  • Crossplane provides a declarative API on top of the "cloud" resources

  • Allowing to bundle these resources

  • So we don’t write code (YAML-engineering)

Recap

  • Think about Crossplane like a control plane for everything

  • Giving you some gluecode CRDs on top

  • These CRDs work as usual in K8s-land

Disclaimer

  • We are still critical regarding Crossplane

Basics ./. Managed Resource

  • It is all about managing Managed Resources

  • Like in Kubernetes

  • Think about having RDS-Object

  • Everything with an API :)

So following is the same:

  • API resources

  • Cloud resources

  • Cloud [resource] CRD

Provider

  • Later we install Providers

  • Our Cloud/API specific CRDs

Kubernetes

AWS

Digitalocean

Azure

ArgoCD

Helm

Kubernetes Workflow

  • Crossplane extends the K8s-API

  • Workflow is the same:

    • Declaring API resources

    • Reconciliation (looping) API resources

    • kubectl is still our friend <3

🤔

  • So Crossplane (Providers) offers something like Terraform?!

  • Jain 🇩🇪

  • It is declarative (Kubernetes way)

Idea of Crossplane (sneak peak)

  • Crossplane offers CRDs on top of Providers CRDs

  • Divide between Consumers and Infra

  • Hint: Kube-bind → https://github.com/kube-bind/ (replacing providers)

Dividing Consumers/Dev and Infra/Ops😱?

  • Jain 🇩🇪

  • Infra defines an interface/API using CompositeResourceDefinition (XRD)

  • Compositions fulfill the API by bundling Managed Resources

  • Dev use Claims to instantiate Composite Resource (XR)

  • XR represents a configured Composition

A Claim is to a XR what a PVC ist to a PV

ROBERT malt ein BILD ❤️

Rephrasing Infra

  • Think about the Infra team as your cloud provider

Provider

  • Our Crossplane has no resources to access

  • We need Provider to access API driven backends

  • Providers are bundled as OCI-Images

So a Provider:

ProviderConfig

  • While Provider installs the provider control plane

  • ProviderConfig configures the provider control plane

  • Most likely providing Credentials ☝️

Lobhudelei

  • Reconciliation Loop all the time

  • All as Code

  • GitOps (aka everything is in Git)

  • Shifting Left (to the Devs)

  • Giving Complexity to the Ops aka Infra

Editors?!!

About

Workshop during DevOpsCon 2023 workshops day

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 53.8%
  • HTML 30.2%
  • SCSS 15.6%
  • CSS 0.4%