Cluster Role
Provides a Kubernetes Cluster Role
Examples
Create a Cluster Role
const clusterRole = provider.makeClusterRole({
properties: () => ({
metadata: {
name: "aws-load-balancer-controller-role",
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