Workload service account
For private nodes, workload pods run on dedicated nodes and do not sync to the control plane cluster namespace. Configure image pull authentication at the node level using privateNodes.joinNode.containerd.registry.
The workloadServiceAccount allows you to enforce the use of a specific ServiceAccount for all vCluster workload pods running in the control plane cluster. For example, you can attach a shared imagePullSecret to the ServiceAccount so that all synced pods use the same secret when pulling container images.
controlPlane:
advanced:
workloadServiceAccount:
enabled: true
name: image-pull-sa
imagePullSecrets:
- name: workload-service-account-image-pull-secret
The pod specification (spec) of the synced workloads should not define its own imagePullSecrets. This is because imagePullSecrets are only copied from the ServiceAccount to the pod when the pod specification does not already include them.
The referenced imagePullSecrets must also exist in the host namespace where the vCluster’s workload pods are synced.
An easy way to achieve this is by using Cluster Templates. In addition to allowing you to add arbitrary Kubernetes objects inside the cluster, Cluster Templates also enable you to create arbitrary Kubernetes objects in the control plane cluster namespace where the vCluster’s StatefulSet is deployed.
If syncing ServiceAccount resources from the cluster to the control plane cluster is enabled, the workloadServiceAccount setting is ignored.
Config reference​
For every field under controlPlane.advanced.workloadServiceAccount, see the controlPlane reference.