QuestionQ268Verified/Kubernetes FundamentalsCopy linkReport a problemAsk AstroTutorSave questionHow can a Pod be set up to use a ServiceAccount for authenticated access to the API?ABy attaching the ServiceAccount directly to the kube-scheduler to change how the Pod is scheduled.BBy specifying the ServiceAccount name in the Pod specs, Kubernetes mounts its token as a volume.CBy embedding the ServiceAccount token inside the container image at build time.DBy converting the ServiceAccount into a ConfigMap that the Pod consumes as environment variables.Show AnswerAnswerExplanationA Pod selects its ServiceAccount by setting spec.serviceAccountName. Kubernetes makes that account’s credentials available to the containers through an automatically mounted ServiceAccount token volume, which the workload can use to authenticate to the Kubernetes API.Learn moreConfigure Service Accounts for PodsService AccountsShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion