Set up an Azure Kubernetes Service connector
Capabilities
Resource | Sync | Provision |
---|---|---|
Accounts | ✅ | |
Groups | ✅ | |
Roles | ✅ | |
Cluster roles | ✅ | |
Namespaces | ✅ |
Gather Azure Kubernetes Service credentials
Configuring the connector requires you to pass in credentials generated in Azure Kubernetes Service. Gather these credentials before you move on.
To create a Service Principal in Azure Kubernetes Service the user must have the following permissions:
- Application.ReadWrite.All
- Directory.ReadWrite.All
Roles that grant these permissions include:
- Azure AD Administrator
- Application Administrator
- Cloud Application Administrator
To assign a role to the Service Principal, the user must have Azure resource-level permissions, typically at the subscription, resource group, or AKS resource level:
- Microsoft.Authorization/roleAssignments/write permission
Look up your Azure subscription ID and cluster resource group name
In Azure, search for and navigate to your cluster’s home page.
On the Overview tab, locate the Essentials section.
Make a note of the cluster’s resource group name and subscription ID.
Look up your tenant ID
In the main search bar, click Tenant properties.
Make a note of the tenant ID.
Create a Service Principal
If desired, you can use an existing Service Principal. Follow these steps if you want to create a new one.
In Entra admin center, navigate to App registrations.
Click + New registration.
Give the application a name, such as “ConductorOne”.
Select the supported account type appropriate for your organization. For most internal automation, “Accounts in this organizational directory only (Single tenant)” is sufficient.
You do not need to set a redirect URI.
Click Register.
The new app is created. Carefully copy and save the Application (client) ID and the Directory (tenant) ID shown on the application summary page.
Next, we’ll generate a client secret for this app. Click Certificates & secrets.
Click + New client secret.
Give the client secret a description and set its expiration.
Click Add.
The client secret is generated. Carefully copy and save the Secret Value.
Assign Azure RBAC permissions to the Service Principal
Next, grant this Service Principal the Reader role at the subscription level so it can discover and read all your AKS cluster information.
In the Azure portal’s search bar, type “Subscriptions” and select the relevant Azure subscription.
In the left-hand menu of your Subscription, select Access control (IAM).
Click + Add > Add role assignment.
On the Role tab, search for and select the Reader role.
Click Next.
On the Members tab, ensure User, group, or service principal is selected for Assign access to.
Click + Select members.
In the Select members pane, search for and select the name of your App Registration.
Click Select at the bottom of the pane.
Click Review + assign at the bottom.
Allow time for the new role to propagate. Azure role assignments can take several minutes (typically five to 15, sometimes up to 30) to fully propagate.
Make sure your Service Principal has cluster access
The Service Principal must have access to the cluster in Azure and the proper permissions defined in the cluster.
In Azure, navigate to the cluster’s admin page and click Access control (IAM).
Locate Role assignments add a new assignment for your Service Principal. Commonly used roles are “Azure Kubernetes Service Cluster User Role” and “Azure Kubernetes Service Cluster Admin Role”.
Be aware that propagation of this assignment may take some time (up to multiple hours) depending on the size and complexity of your cluster.
That’s it! Next, move on to the connector configuration instructions.
Configure the Azure Kubernetes Service connector
To complete this task, you’ll need:
- The Connector Administrator or Super Administrator role in ConductorOne
- Access to the set of Azure Kubernetes Service credentials generated by following the instructions above
Follow these instructions to use a built-in, no-code connector hosted by ConductorOne.
In ConductorOne, navigate to Admin > Connectors and click Add connector.
Search for Azure Kubernetes Service and click Add.
Choose how to set up the new Azure Kubernetes Service connector:
Add the connector to a currently unmanaged app (select from the list of apps that were discovered in your identity, SSO, or federation provider that aren’t yet managed with ConductorOne)
Add the connector to a managed app (select from the list of existing managed apps)
Create a new managed app
Set the owner for this connector. You can manage the connector yourself, or choose someone else from the list of ConductorOne users. Setting multiple owners is allowed.
If you choose someone else, ConductorOne will notify the new connector owner by email that their help is needed to complete the setup process.
Click Next.
Find the Settings area of the page and click Edit.
Enter the Azure Kubernetes Service credentials into the relevant fields.
Click Save.
The connector’s label changes to Syncing, followed by Connected. You can view the logs to ensure that information is syncing.
That’s it! Your Azure Kubernetes Service connector is now pulling access data into ConductorOne.
Follow these instructions to use the Azure Kubernetes Service connector, hosted and run in your own environment.
When running in service mode on Kubernetes, a self-hosted connector maintains an ongoing connection with ConductorOne, automatically syncing and uploading data at regular intervals. This data is immediately available in the ConductorOne UI for access reviews and access requests.
Step 1: Set up a new Azure Kubernetes Service connector
In ConductorOne, navigate to Connectors > Add connector.
Search for Baton and click Add.
Choose how to set up the new Azure Kubernetes Service connector:
Add the connector to a currently unmanaged app (select from the list of apps that were discovered in your identity, SSO, or federation provider that aren’t yet managed with ConductorOne)
Add the connector to a managed app (select from the list of existing managed apps)
Create a new managed app
Set the owner for this connector. You can manage the connector yourself, or choose someone else from the list of ConductorOne users. Setting multiple owners is allowed.
If you choose someone else, ConductorOne will notify the new connector owner by email that their help is needed to complete the setup process.
Click Next.
In the Settings area of the page, click Edit.
Click Rotate to generate a new Client ID and Secret.
Carefully copy and save these credentials. We’ll use them in Step 2.
Step 2: Create Kubernetes configuration files
Create two Kubernetes manifest files for your Azure Kubernetes Service connector deployment:
Secrets configuration
# baton-aks-secrets.yaml
apiVersion: v1
kind: Secret
metadata:
name: baton-aks-secrets
type: Opaque
stringData:
# ConductorOne credentials
BATON_CLIENT_ID: <ConductorOne client ID>
BATON_CLIENT_SECRET: <ConductorOne client secret>
# Azure Kubernetes Service credentials
BATON_SUBSCRIPTION_ID: <Azure subscription ID>
BATON_RESOURCE_GROUP: <Resource group name of the cluster>
BATON_CLUSTER_NAME: <Name of the cluster to sync>
BATON_TENANT_ID: <The directory (tenant) ID where your service principal is registered>
BATON_SP_CLIENT_ID: <The Application (client) ID of your service principal>
BATON_SP_CLIENT_SECRET: <The client (Service Principal) secret>
See the connector’s README or run --help
to see all available configuration flags and environment variables.
Deployment configuration
# baton-aks.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: baton-aks
labels:
app: baton-aks
spec:
selector:
matchLabels:
app: baton-aks
template:
metadata:
labels:
app: baton-aks
baton: true
baton-app: aks
spec:
containers:
- name: baton-aks
image: ghcr.io/conductorone/baton-aks:latest
imagePullPolicy: IfNotPresent
envFrom:
- secretRef:
name: baton-aks-secrets
Step 3: Deploy the connector
Create a namespace in which to run ConductorOne connectors (if desired), then apply the secret config and deployment config files.
Check that the connector data uploaded correctly. In ConductorOne, click Applications. On the Managed apps tab, locate and click the name of the application you added the Azure Kubernetes Service connector to. Azure Kubernetes Service data should be found on the Entitlements and Accounts tabs.
That’s it! Your Azure Kubernetes Service connector is now pulling access data into ConductorOne.