Skip to main content

Role

Provides a Kubernetes Role

Examples#

Create a Role#

const role = await provider.makeRole({
name: "aws-load-balancer-controller-leader-election-role",
properties: () => ({
metadata: {
labels: {
"app.kubernetes.io/name": "aws-load-balancer-controller",
},
namespace: "kube-system",
},
rules: [
{
apiGroups: [""],
resources: ["configmaps"],
verbs: ["create"],
},
{
apiGroups: [""],
resourceNames: ["aws-load-balancer-controller-leader"],
resources: ["configmaps"],
verbs: ["get", "update", "patch"],
},
],
}),
});

Source Code Examples#

Used By#

Listing#

The following commands list the Role type:

gc list --types Role

Short version:

gc l -t Role