Controllers - execute business logic.
Resources - provide storage and resources.
Webhooks - defaulting, validation, conversion.
Resource stores stuff --> Controller does stuff.
Resources (example Foo resource) are stored in ETCD by the apiserver. Async watch notifications on object create / delete / update from Foo Resource in ETCD to Foo Controller.
- Request comes in to Request API - apiserver stores it in ETCD
- after object is stored apiserver sends watch events to clients watching that Resource type
- Controllers watch Resources types they need to respond to...
- this is done async
TypeMeta (Kind - Group - Version).
- Kind (ex. Deployment) - this is name name of the API, conceptually what the object is - like a class name
- Group (apps) - groups APIs together, like a package in Go or Java
- Version - defines a version of the API structure and defaults, not about functionality
ObjectMeta (metadata).
- Name and Namespace - uniquely identify an object for a given resource
- Labels - key-value pairs that may be queried (selected)
Spec & Status.
- Spec - Objects desired state (eg how many replicas to run, template for pods etc)
- Status (shown after apply) - defines the observed state for an object (eg. how many replicas are running)