Courseiva
Application Deployment →easyMultiple Select

CKAD Application Deployment Practice Question

Which TWO of the following are correct about the difference between 'kubectl apply' and 'kubectl create'?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

'kubectl apply' can be used to update existing resources, whereas 'kubectl create' will fail if the resource already exists.

'kubectl apply' can update existing resources, while 'kubectl create' will fail if the resource already exists. Option B is correct: 'kubectl apply' is declarative (manages desired state), whereas 'kubectl create' is imperative (directly creates). Option C is false: 'kubectl apply' can both create and update resources. Option D is false: 'kubectl apply' does not delete resources removed from the file; it only manages the resources in the file. Option E is false: 'kubectl create' can create resources from stdin, not just YAML files.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    'kubectl apply' can be used to update existing resources, whereas 'kubectl create' will fail if the resource already exists.

    Why this is correct

    kubectl apply performs a merge-patch on an existing object's desired state, so it can seamlessly update a resource that already exists in the cluster, whereas kubectl create sends POST requests to the API server and receives an AlreadyExists error if the resource is present. This distinction is fundamental: create is for initial provisioning only, while apply is idempotent and safe to run multiple times, making it ideal for declarative configuration management in CI/CD pipelines.

  • ✓

    'kubectl apply' is declarative, while 'kubectl create' is imperative.

    Why this is correct

    kubectl apply uses client-side or server-side merging to reconcile the desired state declared in a manifest with the live cluster state, keeping the full resource definition as the source of truth. In contrast, kubectl create is imperative because it directly submits a specific resource object for creation without tracking or merging any prior state. Apply persists a last-applied-configuration annotation, enabling subsequent diffs, while create simply sends the object and fails if it already exists.

  • ✗

    'kubectl apply' can only be used to create resources, not update them.

    Why it's wrong here

    kubectl apply is precisely designed for both creating and updating resources; when the resource already exists, it patches the live object with any changes in the provided manifest. The update is done by computing a three-way diff between the live state, the last-applied-configuration, and the new desired state, so it is a common misconception that apply is create-only. In reality, apply is the recommended way to manage Kubernetes objects declaratively across their entire lifecycle.

  • ✗

    'kubectl apply' will delete resources if they are removed from the file.

    Why it's wrong here

    kubectl apply only creates or updates objects; removing a resource from a manifest file does not trigger its deletion from the cluster. To delete resources no longer present in the file, you must use the --prune flag with an appropriate label selector (e.g., kubectl apply --prune -l app=myapp) or issue a separate kubectl delete command. Without pruning, apply leaves any previously created objects untouched.

  • ✗

    'kubectl create' can only create resources from YAML files, not from stdin.

    Why it's wrong here

    kubectl create can read resources from a variety of input sources; using a dash (-) as the filename sends the manifest through standard input, for example, cat pod.yaml | kubectl create -f -. It also supports inline definitions via the --filename flag and can create resources imperatively with the -o yaml option without any file, such as kubectl create deployment nginx --image=nginx. Therefore, limiting create to YAML files is incorrect; it can also handle JSON and direct command-line flags.

About these practice questions

One of 826 original CKAD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.