Skip to content

Getting Started

Overview

This guide walks you through configuring the Britive Access Broker to manage just-in-time RBAC access to Kubernetes clusters — creating a ClusterRoleBinding or RoleBinding at checkout and deleting it at checkin.

What you’ll accomplish:

  • Deploy and configure the Britive Access Broker with kubeconfig access to your cluster
  • Configure checkout and checkin routines from the access-broker-examples repository
  • Register the Kubernetes cluster as a Resource Manager resource in Britive
  • Create a Resource Manager access profile
  • Check out cluster access and verify end-to-end

Prerequisites

Before you begin, make sure you have:

  • A Britive tenant with administrator access
  • A running Britive Access Broker with network access to the Kubernetes API server
  • A kubeconfig with cluster-admin (or equivalent) permissions for the broker service account
  • kubectl available on the broker host

Never hardcode credentials. Use environment variables, your secret manager, or the Britive Secrets Store.

How It Works

The Access Broker uses kubectl to create and delete Kubernetes RBAC bindings. At checkout, Britive creates a ClusterRoleBinding (or RoleBinding for namespace-scoped access) for the user. At checkin (or on expiry), the binding is deleted — no standing cluster permissions remain.

User → Britive Console → Access Broker → kubectl → ClusterRoleBinding/RoleBinding (create/delete)

Onboarding the Application

Configure the broker for Kubernetes RBAC management. This is a one-time setup performed by an administrator.

Reference scripts are available in the britive/access-broker-examples repository under Kubernetes/permissions/. For EKS and GKE deployment of the broker itself, see the britive/onboarding repository under Access Broker/.

Using the Britive Console

Deploy the Access Broker

Follow the Britive Access Broker deployment guide to install and register a broker. For EKS, use the deployment templates in britive/onboarding/Access Broker/eks-deployment/.

Configure broker kubeconfig

Create a Kubernetes service account and ClusterRoleBinding for the broker, then copy the resulting kubeconfig to the broker.

# broker-sa.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: britive-broker
  namespace: britive
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: britive-broker-admin
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: britive-broker
  namespace: britive

Configure the broker scripts

git clone https://github.com/britive/access-broker-examples.git
# Copy Kubernetes/permissions/ scripts to your broker's scripts directory

Register the cluster in Resource Manager

Navigate to Resource ManagerResourcesAdd Resource. Enter the cluster API server URL and kubeconfig details.

Create Your First Access Profile

Using the Britive Console

Open Resource Manager

Navigate to Resource ManagerProfilesAdd Profile.

Configure the profile

FieldValue
NameA descriptive name (e.g., K8s-ViewOnly)
ExpirationSet a max session duration (e.g., 1h)

Associate resources

Under Associations, select the Kubernetes cluster resource.

Add a permission

Under Permissions, select the checkout/checkin routine for the target cluster role.

Add a policy

Under Policies, assign members and configure conditions.

Save and activate

Click Save.

Verify

Check out the profile

Navigate to My Access → find your profile → click Check Out. Britive returns a kubeconfig or connection instructions.

Confirm RBAC binding

kubectl get clusterrolebindings | grep britive
kubectl auth can-i list pods --as=<your-username>

Check in

Return to My Access → click Check In. The ClusterRoleBinding should be deleted:

kubectl auth can-i list pods --as=<your-username>
# Expected: no

Troubleshoot

SymptomLikely CauseFix
Checkout failsBroker cannot reach the API serverCheck network connectivity and API server firewall rules
Forbidden when creating bindingBroker service account lacks cluster-adminVerify the ClusterRoleBinding for the broker service account
Binding not deleted after checkinkubectl delete error in checkin routineCheck broker logs; manually delete the binding with kubectl delete clusterrolebinding

Next Steps

Last updated on