Certified Kubernetes Application Developer (CKAD) Practice Test 2026 - Free CKAD Practice Questions and Comprehensive Study Guide

Question: 1 / 400

Which command would you use to create a Custom Resource Definition in Kubernetes?

kubectl create crd

kubectl apply -f crd.yaml

Creating a Custom Resource Definition (CRD) in Kubernetes is an essential task when you want to extend the Kubernetes API to manage your own resources. The correct approach to create a CRD is by using a YAML manifest that defines the desired state of the CRD.

Using the command `kubectl apply -f crd.yaml` effectively instructs Kubernetes to create or update the specified resource as defined in the `crd.yaml` file. This file typically contains the schema for the custom resource, including its specifications and validation rules. The `apply` command is particularly useful because it can handle both creation and updates, ensuring that the necessary changes are made to the cluster's state as described in the provided YAML configuration.

In contrast, other commands listed serve different purposes. For instance, `kubectl create crd` is not a valid command syntax for creating a CRD. Similarly, `kubectl get crd` is used to list existing CRDs in the cluster, and `kubectl edit crd` allows users to modify an existing CRD directly in the default editor, which wouldn't help in the context of creating a new CRD. Therefore, the choice of using `kubectl apply -f crd.yaml` is the most appropriate

Get further explanation with Examzify DeepDiveBeta

kubectl get crd

kubectl edit crd

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy