Skip to main content

Cluster Role Binding

Provides a Kubernetes Cluster Role Binding

Examples#

Create a Cluster Role Binding#

const clusterRoleBinding = await provider.makeClusterRoleBinding({
name: "aws-load-balancer-controller-rolebinding",
properties: () => ({
metadata: {
labels: {
"app.kubernetes.io/name": "aws-load-balancer-controller",
},
},
roleRef: {
apiGroup: "rbac.authorization.k8s.io",
kind: "ClusterRole",
name: "aws-load-balancer-controller-role",
},
subjects: [
{
kind: "ServiceAccount",
name: "aws-load-balancer-controller",
namespace: "kube-system",
},
],
}),
});

Source Code Examples#

Used By#

Listing#

The following commands list the ClusterRoleBinding type:

gc list --types ClusterRoleBinding

Short version:

gc l -t ClusterRoleBinding