Skip to main content

Role Binding

Provides a Kubernetes Cluster Role Binding

Examples#

Create a Role Binding#

const roleBinding = 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 RoleBinding type:

gc list --types RoleBinding

Short version:

gc l -t RoleBinding