field selector
A kubectl filter that selects objects by the value of a field, such as an event's reason, rather than by label.
In more detail
Only some fields support it, such as metadata.name, status.phase or an event's reason. Filtering events by reason, such as ScalingReplicaSet or Scheduled, shows which component acted. Label selectors, by contrast, work on any label you set.
Example
kubectl get events --field-selector reason=ScalingReplicaSetRelated terms
- label selector — A query that picks objects by their labels, such as every pod with app=web; controllers and Services depend on it.
- Kubernetes event — A short, time-stamped record a component writes into the cluster to say what it did or why it could not, such as Scheduled or FailedMount.
Taught in
- Monitoring With The Built-in CLI — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Observability: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Mock Exam: Sixteen Tasks Against The Clock — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Control Plane: etcd, API Server, Scheduler, Controllers — Kubernetes: Production-Grade Container Orchestration