Skip to main content

Service Account

Provides a Kubernetes Service Account

Examples#

Create a Service Account#

const serviceAccount = await provider.makeServiceAccount({
name: "aws-load-balancer-controller",
dependencies: { role: resources.roleLoadBalancer },
properties: ({ dependencies: { role } }) => ({
metadata: {
annotations: {
"eks.amazonaws.com/role-arn": role?.live?.Arn,
},
labels: {
"app.kubernetes.io/component": "controller",
"app.kubernetes.io/name": "aws-load-balancer-controller",
},
namespace: "kube-system",
},
}),
});

Listing#

The following command lists the ServiceAccount type:

gc list --types ServiceAccount