mirror of
https://github.com/apricote/presentations.git
synced 2026-01-13 13:01:03 +00:00
2 KiB
2 KiB
Kubebuilder
Content
- CRDs
- Controller / Operator
- Kubebuilder
- Live Coding
- Real Life Use Cases
CRDs
Controller
A control loop that watches the state [...] and makes changes attempting to move the current state towards the desired state.
--
Controller
- integrated in
kube-apiserverorkube-controller-manager - watch builtin k8s objects (
core,apps,batch) - logic ontop of data
- create sub-resources
--
Controller
deployment controller
- watches
Deployments - creates and deletes
ReplicaSets - scales
ReplicaSetsfor rolling deployments
--
Controller
kubelet
- watches
PodSpecs - starts/stops containers
--
Operator
- term coined by CoreOS
- same as controller but for CRDs
- integrate operational knowledge
- provide usability features
- updates
- scaling
- backups
- integration with k8s
Kubebuilder
Live Coding
Check out the source at
https://github.com/apricote/kubebuilder-poke-sync
Real Life Use Cases
Databases
- scaling
- configuration
- disaster recovery
- e.g. zalando/postgres-operator
- e.g. mongodb-enterprise-kubernetes
--
Real Life Use Cases
Provisioning external resources
- call external APIs
- expose external state in cluster
- e.g. jetstack/cert-manager
- e.g. awslabs/aws-service-operator
--
Real Life Use Cases
Application Lifecycle Managment
- deployment
- supervised updates
- health checking + alerts
- Helm Chart++
- e.g. gitlab-operator
- e.g. Tenant Operator