Skip to main content

Cluster Role

Provides a Kubernetes Cluster Role

Examples#

Create a Cluster Role#

const clusterRole = await provider.makeClusterRole({
name: "aws-load-balancer-controller-role",
properties: () => ({
metadata: {
labels: {
"app.kubernetes.io/name": "alb-ingress-controller",
},
},
rules: [
{
apiGroups: ["", "extensions"],
resources: [
"configmaps",
"endpoints",
"events",
"ingresses",
"ingresses/status",
"services",
"pods/status",
],
verbs: ["create", "get", "list", "update", "watch", "patch"],
},
{
apiGroups: ["", "extensions"],
resources: ["nodes", "pods", "secrets", "services", "namespaces"],
verbs: ["get", "list", "watch"],
},
],
}),
});

Source Code Examples#

Used By#

Listing#

The following commands list the ClusterRole type:

gc list --types ClusterRole

Short version:

gc l -t ClusterRole