Create a new ServiceAccount named backend-sa in the existing namespace default, which has the capability to list the pods inside the namespace default.
Create a new Pod named backend-pod in the namespace default, mount the newly created sa backend-sa to the pod, and Verify that the pod is able to list pods.
Ensure that the Pod is running.
Suggested Answer: A
Get Premium CKS Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
40 comments · newest first
AL
Alisha
11 months ago
Sounds cool, but I’m a bit skeptical about the security implications.
GE
Georgene
11 months ago
Yup, that's how it works! The permissions are key.
WI
Willow
11 months ago
Totally agree, it's super useful for managing permissions.
WI
William
11 months ago
Wait, can the pod really list pods with just that SA?
PA
Patti
11 months ago
Just created a ServiceAccount named backend-sa in the default namespace!
MA
Major
12 months ago
I remember that the service account needs to be linked to a role that allows listing pods. I just need to make sure I get the role binding part correct.
HE
Heike
12 months ago
I’m a bit confused about the YAML structure for the service account. I hope I can get it right during the exam.
RU
Rutha
1 year ago
I think we did a similar question where we had to create a pod with a specific service account. I hope I can recall the exact commands.
NA
Natalya
1 year ago
I remember we practiced creating service accounts, but I'm not entirely sure how to set the permissions for listing pods.
AL
Alise
1 year ago
This seems straightforward, but I want to make sure I don't miss any steps. I'll go through it carefully, creating the service account, mounting it to the pod, and then verifying the pod can list the pods in the default namespace.
VE
Veda
1 year ago
Okay, I think I've got a good strategy. First, I'll create the backend-sa service account using the kubectl create serviceaccount command. Then I'll create the backend-pod and use the serviceAccountName field to mount the backend-sa. Finally, I'll verify the pod can list the pods by running a command inside the container.
KA
Katina
1 year ago
Hmm, I'm a bit unsure about the steps here. Do I need to set any specific permissions or roles for the backend-sa service account to be able to list the pods? I'll have to double-check the documentation on that.
TH
Theola
1 year ago
This looks straightforward enough. I'll start by creating the backend-sa service account, then mount it to the backend-pod and verify the pod can list the pods in the default namespace.
GL
Glenna
1 year ago
This is a pretty straightforward question, but I can imagine it might trip up some people if they're not familiar with how ServiceAccounts work. Good thing we've got this explanation to guide us!
LE
Leoma
1 year ago
Wait, do we need to create any specific permissions or Role for the backend-sa ServiceAccount? I don't want to forget that step and end up with a non-working solution.
BI
Billy
1 year ago
As long as you create the ServiceAccount and mount it to the Pod, you should be good to go without any extra steps.
SE
Sena
1 year ago
The ServiceAccount will inherit the permissions of the default service account in the same namespace.
VI
Vilma
1 year ago
Just create the ServiceAccount and mount it to the Pod, it should work fine without any additional permissions.
KY
Kyoko
1 year ago
No, you don't need to create any specific permissions or Role for the backend-sa ServiceAccount. It will automatically have the default permissions.
AL
Alethea
2 years ago
Haha, I bet the exam question is going to be something like, 'Which command do you use to list the Pods in the default namespace?' I'm already prepared for that one!
LE
Leota
1 year ago
Kayleigh: You use the kubectl command to list the Pods in the default namespace.
KA
Kayleigh
1 year ago
User 2: What is it?
JI
Jina
1 year ago
User 1: I think I know the answer to that question.
VA
Val
2 years ago
We should make sure that the Pod is able to list pods by mounting the backend-sa to the pod.
LE
Leontine
2 years ago
Sounds good to me. As long as we follow the instructions carefully, we should be able to get this done without any issues.
SA
Samira
1 year ago
User 4: Finally, verify that the pod is able to list pods and ensure that it is running.
KA
Kattie
1 year ago
User 3: Next, we need to create a new Pod named backend-pod and mount the backend-sa to it.
JO
Joanna
1 year ago
User 2: Make sure to grant it the capability to list pods in the default namespace.
SH
Sharika
1 year ago
User 1: Let's create a new ServiceAccount named backend-sa in the default namespace.
EV
Eva
2 years ago
Yes, and we also need to create a new Pod named backend-pod in the default namespace.
VA
Val
2 years ago
I think we need to create a new ServiceAccount named backend-sa in the default namespace.
NO
Norah
2 years ago
Okay, let's see if I understand this correctly. We need to create a new ServiceAccount named backend-sa in the default namespace, and then mount that ServiceAccount to a new Pod named backend-pod. The goal is to verify that the Pod can list the Pods in the default namespace.
CA
Camellia
1 year ago
Make sure to check that the Pod is running successfully.
EL
Elenor
1 year ago
After that, we can verify if the Pod is able to list the Pods in the default namespace.
CA
Carlota
1 year ago
Next, we need to create a Pod named backend-pod and mount the backend-sa ServiceAccount to it.
NI
Nieves
1 year ago
Let's start by creating the ServiceAccount backend-sa in the default namespace.
TR
Truman
1 year ago
Make sure to check that the Pod is running successfully.
SA
Santos
1 year ago
After that, we can verify if the Pod is able to list the Pods in the default namespace.
YU
Yuonne
1 year ago
Next, we need to create a Pod named backend-pod and mount the backend-sa ServiceAccount to it.
LE
Leatha
1 year ago
Let's start by creating the ServiceAccount backend-sa in the default namespace.