CKS mock exam 1 Q1

in the CKS mock exam 1 Q1

in the solution it says to use serviceAccount: where in the documentation uses serviceAccountName:

apiVersion: v1
kind: Pod
metadata:
  annotations:
    container.apparmor.security.beta.kubernetes.io/nginx: localhost/restricted-frontend #Apply profile 'restricted-fronend' on 'nginx' container 
  labels:
    run: nginx
  name: frontend-site
  namespace: omni
spec:
  serviceAccount: frontend-default #Use the service account with least privileges
  containers:
...
...

what should be the correct option?

KR
David

In pod definition file you can add either and the pod will be created fine.
Once the pod created if you edit it you will see that both are present.

Cheers

yes, I saw it, seems as the serviceaccount is the old version of the servieaccountname is the new version for the same thing