CKS SERVICE ACCOUNT LAB issue

CKS Course ISSUE IN LAB FOR SERVICE ACCOUNT:

How to Update the deployment with new SA.
i have edited the same using kubectl edit deployment. and checked the status with kubectl get pods.

please indicate if above is right method to perform the mount of newly created SA file.

Hello @vdabhi123

please use this command to get the yaml file of the deployment to be able to edit
kubectl get deployments/web-dashboard -o yaml > pod2.yaml
nano pod2.yaml
and add this line as shown


then save the file and apply the changes using
kubectl apply -f pod2.yaml
By this method, the service account will be changed to “dashboard-sa” and the task will be completed successfully
Best Regards