Google Cloud Certified Associate Cloud Engineer Practice 2026 - Free Cloud Engineer Practice Questions and Study Guide

Question: 1 / 400

What command is used to update a Kubernetes deployment that was created with the `kubectl create` command?

`kubectl update`

`kubectl replace`

`kubectl apply`

The correct command to update a Kubernetes deployment that was created with the `kubectl create` command is `kubectl apply`. This command is designed to apply changes to a resource by updating the current state of the resource in the cluster based on the configuration specified in a YAML or JSON file.

When a deployment needs to be modified, using `kubectl apply` is particularly effective because it allows Kubernetes to manage the desired state of the resource based on the new configuration you provide, ensuring that only the necessary changes are made. This approach aligns with the declarative model of configuration management in Kubernetes, where the desired state is always maintained.

While there are other commands like `kubectl replace`, which can entirely replace an existing resource with a new definition, this may lead to downtime for the resource being updated. In contrast, `kubectl apply` intelligently handles incremental updates, maintaining operational stability during the update process.

Get further explanation with Examzify DeepDiveBeta

`kubectl modify`

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy