kubectl apply submits a YAML manifest to the Kubernetes API, creating a resource or updating an existing resource so the control plane reconciles the cluster toward the declared desired state. section 1.9
Choose apply when the manifest is the source of truth and resource lifecycle behavior matters:
- Use kubectl create -f when the resource must not already exist; an existing resource causes an error. section 1.9
- Use kubectl apply -f to create a missing resource or update an existing one. section 1.9
- Use kubectl replace -f when replacement semantics are intended; Deployments receive a new rollout. section 1.9
Apply a node-selected pod
Add nodeSelector: disktype: ssd to ssd-pod.yaml, then run kubectl apply -f ssd-pod.yaml. Verify placement with kubectl get po -o wide; the pod should show the selected node, such as kind-worker. section 4.1





