What is a Kubernetes resource in the context of this lecture?
A resource is an object stored through the Kubernetes API such as a Deployment Job or custom object.
What is the job of a built in Kubernetes controller such as the Deployment controller?
A controller continuously watches resources and makes changes in the cluster so the actual state matches the desired state.
In the lecture example what happens behind the scenes when you create a Deployment with three replicas?
The Deployment controller creates a ReplicaSet and the ReplicaSet creates three Pods to match the desired replica count.
What is a custom resource in Kubernetes?
A custom resource is a new object type that you define yourself so Kubernetes can store and manage that kind of object.
In the lecture example what was the custom resource called and what was it meant to represent?
The custom resource was called FlightTicket and it was meant to represent a flight booking request.
Why does Kubernetes reject a FlightTicket manifest before a CustomResourceDefinition is created?
Kubernetes rejects it because the API server does not yet know that FlightTicket is a valid kind in that API group and version.
What is a CustomResourceDefinition or CRD?
A CRD is a Kubernetes object that tells the API server about a new resource type including its group names scope versions and schema.
What apiVersion and kind are used for defining a CRD?
The apiVersion is apiextensions.k8s.io slash v1 and the kind is CustomResourceDefinition.
What does the scope field in a CRD control?
The scope field controls whether the custom resource is namespaced or cluster scoped.
What information is defined under names in a CRD?
The names section defines the kind singular plural and short name used for the custom resource.
What is the purpose of the versions section in a CRD?
The versions section defines which API versions exist for the custom resource which versions are served and which version is used for storage.
What does served mean for a CRD version?
Served means that version is exposed through the Kubernetes API and users can create or read objects using that version.
What does storage mean for a CRD version?
Storage means that version is the one Kubernetes uses internally to persist the custom resource in etcd.
What is the purpose of the schema inside a CRD?
The schema defines which fields are allowed in the custom resource and what data types and validations those fields must follow.
In the FlightTicket example what fields were defined in the custom resource schema?
The schema defined fields such as from to and number with string and integer types plus validation rules for allowed values.
What does creating the CRD solve and what does it not solve?
Creating the CRD lets Kubernetes accept and store the custom resource but it does not make the resource perform any real world action by itself.
What is a custom controller in Kubernetes?
A custom controller is a program that watches your custom resources and performs real actions when those resources are created updated or deleted.
In the FlightTicket example what would the custom controller do?
The custom controller would watch FlightTicket objects and call an external booking API to create or cancel actual flight bookings.
Why is a custom resource without a controller usually not enough?
Without a controller the custom resource is only data stored in etcd and nothing in the cluster acts on it.
What is the key idea to remember about CRDs and controllers working together?
The CRD defines and validates the new object type while the custom controller gives that object behavior and makes it useful.