Error while creating a Kubernetes Deployment resource
Question:
You tried to create a Deployment resource by using the kubectl utility. However, kubectl returns the provided error message. Which of the following statements is the likely cause of the error message? (Choose one.)
$ kubectl create -f deployment.yaml
The Deployment "sso" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app":"keycloak"}: `selector` does not match template `labels`
- kubectl is likely not authorized to create resources in the Kubernetes cluster
- The command is incorrect. The correct command is kubectl apply
- The Kubernetes cluster likely experienced a transient fault state. To fix the issue, issue the command again
- The resource manifest is misconfigured. The spec.template.metadata.labels property likely does not match the spec.selector.matchLabels property
Answer:
D - is the correct answer