Command theo câu hỏi
get trả lời có gì/đang ở trạng thái nào; describe trả lời vì sao; logs/exec trả lời container đang làm gì; jsonpath/yaml trả lời field chính xác. Trước mutation dùng context/namespace/target, sau mutation kiểm tra expected state.
Imperative và declarative
Imperative command nhanh trong exam nhưng dễ mất reproducibility; YAML/apply dễ review và lặp lại. Dùng dry-run để tạo skeleton, thêm labels/namespace/resources rồi apply. edit tiện debug nhưng phải hiểu thay đổi và drift.
Bài tập
Tạo marker bằng hai cách, inspect labels/conditions, cố ý tạo selector mismatch, thu events rồi sửa. Delete một target cụ thể, verify residual state và cleanup namespace. Pass khi mọi command card ghi rõ context, namespace, expected output và rollback.