Getting Started
Requirements
- x86_64 platform
- AWS Access (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY required)
- Azure access (AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID required)
- Kubernetes access
- Switchblade license key
Installation
- Create namespace for Switchblade
kubectl create ns operators
- Install License and AWS Access keys (replace variables or set environment variables accordingly)
kubectl create secret -n operators generic credentials --from-literal AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --from-literal AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY --from-literal LICENSE_KEY=$LICENSE_KEY
- Create state bucket
// use favorite IaC or console or CLI
aws s3api create-bucket --acl private --bucket mycompany-myenvironment-switchblade-state
- Download and extract deployment package
wget https://s3.amazonaws.com/software.boundless.distributions/switchblade-0.0.18.tgz
tar xvf switchblade-0.0.18.tgz
- Edit deployment.yaml
# update with values from step 3
- name: AWS_STATE_BUCKET
value: ""
- name: AWS_STATE_BUCKET_REGION
value: ""
- Install yamls into cluster
# If installing for first time
kubectl create -f crd.yaml
kubectl create -f rbac.yaml
kubectl apply -f deployment.yaml
# If upgrading
kubectl replace -f crd.yaml
kubectl replace -f rbac.yaml
kubectl apply -f deployment.yaml
Azure setup for Switchblade
Create Enterprise Application
- In the Azure portal, navigate to Azure EntraId > App registrations > New registration.
- Name the application and click register.
- Export the application (client) ID and directory (tenant) ID.
export AZURE_TENANT_ID="Your Azure Tenant ID"
export AZURE_CLIENT_ID="Your Azure Client ID"
Generate Client Secret
- In the Azure portal, go to Azure EntraId > App registrations > Select the Enterprise Application you created.
- Navigate To Certificates & Secrets > New client secret.
- Choose an expiry period, and click Add.
- Export the generated secret value.
export AZURE_CLIENT_SECRET="Your Azure Client Secret"
Assign API Permissions (optional, only required for EntraId resources)
-
App registrations > Select the Enterprise Application you created.
-
Go to API permissions > Add a permission > Microsoft Graph > Application permissions > Select the following permissions:
- User.ReadWrite.All
- Directory.ReadWrite.All
- Group.ReadWrite.All
- User.ManageIdentities.All
- User.Export.All
- AppRoleAssignment.ReadWrite.All
-
Click Add permissions.
-
Grant Admin Consent for default directory.
Assign Permissions
- In the Azure portal, go to Entra Id default directory.
- Navigate to Roles and Administrators.
- Click on Global Administrator.
- Click Add assignments > Search for the Enterprise Application you created > Next > Enter justification > Assign.
Add Application To Your Subscription
- In the Azure portal, go to subscriptions.
- Select the subscription you will add the application to and will be using with Switchblade.
- Export the subscription ID.
export AZURE_SUBSCRIPTION_ID="Your Azure Subscription ID"
- Navigate to Access control (IAM) > Add > Add role assignment.
- Select Privileged Permissions > Owner
- Click next > Select members > Search for the Enterprise Application you created > Select allow user to assign all roles > Click Assign.
- Click next > select “Allow user to assign all roles (highly privileged)” > Click Review + assign. > Click Review + assign.
Provider Specifications
AWSProviderSpec
Name | Type | Description |
---|---|---|
region | string | The region for the aws provider. |
AzureProviderSpec
Name | Type | Description |
---|---|---|
region | string | The region to create your resources in. Required. |
Next
EKS >>