How do you apply declarative configuration stored in YAML to the cluster?

Prepare for the Red Hat OpenShift Developer II DO288 Exam with our quizzes. Study with flashcards and multiple choice questions, each with hints and explanations. Get ready for your certification!

Multiple Choice

How do you apply declarative configuration stored in YAML to the cluster?

Explanation:
Applying declarative configuration stored in YAML to the cluster is done with the OpenShift CLI using the apply command. This reads the YAML file and brings the resources in the cluster to match what’s described in the file. It’s idempotent, so running it multiple times doesn’t recreate resources or erase unrelated state; it updates only what has changed and creates resources that don’t yet exist. This makes it ideal for infrastructure-as-code and repeatable deployments. Using create would only create new resources and fail if they already exist, replace would substitute the whole resource, potentially removing fields, and while kubectl apply can do a similar job, oc apply is the OpenShift-specific way to apply configuration stored in YAML.

Applying declarative configuration stored in YAML to the cluster is done with the OpenShift CLI using the apply command. This reads the YAML file and brings the resources in the cluster to match what’s described in the file. It’s idempotent, so running it multiple times doesn’t recreate resources or erase unrelated state; it updates only what has changed and creates resources that don’t yet exist. This makes it ideal for infrastructure-as-code and repeatable deployments. Using create would only create new resources and fail if they already exist, replace would substitute the whole resource, potentially removing fields, and while kubectl apply can do a similar job, oc apply is the OpenShift-specific way to apply configuration stored in YAML.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy