Service Account
Provides a Kubernetes Service Account
Examples
Create a Service Account
const serviceAccount = provider.makeServiceAccount({
dependencies: { role: resources.roleLoadBalancer },
properties: ({ dependencies: { role } }) => ({
metadata: {
name: "aws-load-balancer-controller",
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