Certified Kubernetes Application Developer (CKAD) Practice Test

Question: 1 / 400

How can you create a service account in Kubernetes?

kubectl create serviceaccount <name>

Creating a service account in Kubernetes is accomplished using the command `kubectl create serviceaccount <name>`. This command directly instructs Kubernetes to create a new service account in the specified namespace (if a namespace is not specified, it defaults to the 'default' namespace).

Service accounts are important in Kubernetes as they provide an identity for processes that run in a pod, allowing them to interact with the Kubernetes API. The `create serviceaccount` command is a standard way to accomplish this task, following the expected syntax for creating resources within Kubernetes.

The other options presented do not correspond to valid commands in Kubernetes. For instance, "new", "add", and "initiate" are not recognized verbs in the context of managing Kubernetes resources, hence they would lead to errors if attempted. The command structure in Kubernetes is fairly consistent, with "create" being the correct verb for initiating the creation of resources like service accounts.

Get further explanation with Examzify DeepDiveBeta

kubectl new serviceaccount <name>

kubectl add serviceaccount <name>

kubectl initiate serviceaccount <name>

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy