Certified Kubernetes Administrator (CKA) · Free practice question 10 of 12
Approving a client CertificateSigningRequest
An admin at Yelverton Insurance created a CertificateSigningRequest named sara-csr for a new user with signerName kubernetes.io/kube-apiserver-client. It shows Pending. How is it approved so a certificate is issued?
- A.kubeadm certs renew sara-csr
- B.kubectl patch csr sara-csr -p '{"status":"Approved"}'
- C.kubectl create token sara-csr --approve
- D.kubectl certificate approve sara-csr
Show answer and explanation
Correct answer: D. kubectl certificate approve sara-csr
Why: kubectl certificate approve adds the Approved condition to the CSR, after which the signer issues the certificate and it can be read from status.certificate. kubeadm certs renew handles kubeadm-managed control plane certificates, a normal patch cannot set the approval condition, and kubectl create token issues ServiceAccount tokens.
More free Certified Kubernetes Administrator (CKA) questions
- Drain flags for DaemonSets and emptyDir
- CronJob concurrencyPolicy Forbid
- Listing cluster-scoped API resources
- Setting the default namespace in a context
- Session affinity by client IP
- Pod dnsPolicy Default versus ClusterFirst
- Raw block volumes with volumeMode
- Debugging a node with kubectl debug
- CreateContainerConfigError from missing ConfigMap
- NetworkPolicy ipBlock with except
- Restoring a PVC from a VolumeSnapshot