Register AKS Cluster with Octopus Deploy

Octopus.Script exported 2020-04-13 by octobob belongs to ‘Octopus’ category.

Step template to Register an AKS Cluster with Octopus Deploy using the Octopus Deploy API

Parameters

When steps based on the template are included in a project’s deployment process, the parameters below can be set.

Octopus Base Url

RegisterAzureCluster.Octopus.Base.Url =

The base url of your Octopus Deploy instance. Example: https://samples.octopus.app

Octopus Api Key

RegisterAzureCluster.Octopus.Api.Key =

The API key of a user in Octopus Deploy who has permissions to register the cluster.

Azure Account

RegisterAzureCluster.Azure.Account =

The Azure Account with permissions to access the AKS cluster

AKS Cluster Name

RegisterAzureCluster.AKS.Name =

The name of the AKS Cluster Name to register with Octopus Deploy.

AKS Resource Group Name

RegisterAzureCluster.ResourceGroup.Name =

Name of the Azure Resource Group where the AKS cluster is located.

Role CSV List

RegisterAzureCluster.Roles.List =

Comma separated list of environments to assign to the AKS cluster in Octopus Deploy.

Environment CSV List

RegisterAzureCluster.Environment.List =

Comma separated list of environments to assign to the AKS cluster in Octopus Deploy.

Tenant CSV List

RegisterAzureCluster.Tenant.List =

(Optional) If this is for a tenant, the a comma separated list of tenants to assign the AKS cluster to in Octopus Deploy

Tenanted Deployments

RegisterAzureCluster.Tenant.DeploymentType = Untenanted

Choose the kind of deployment where this deployment target should be included.

Machine Policy Id Or Name

RegisterAzureCluster.MachinePolicy.IdOrName = Default Machine Policy

Enter in the name or the Id of the Machine Policy in Octopus Deploy for the AKS Cluster.

Worker Pool Id or Name

RegisterAzureCluster.WorkerPool.IdOrName =

The name or id of the worker pool all communication will go through for the K8s cluster. Leave blank for the default worker pool.

Overwrite Existing Registration

RegisterAzureCluster.Overwrite.Existing = False

Indicates if the existing cluster should be overwritten

Script body

Steps based on this template will execute the following PowerShell script.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

$OctopusAPIKey = $OctopusParameters["RegisterAzureCluster.Octopus.Api.Key"]
$RegistrationName = $OctopusParameters["RegisterAzureCluster.AKS.Name"]
$ClusterResourceGroup = $OctopusParameters["RegisterAzureCluster.ResourceGroup.Name"]
$OctopusUrl = $OctopusParameters["RegisterAzureCluster.Octopus.Base.Url"]
$Roles = $OctopusParameters["RegisterAzureCluster.Roles.List"]
$Environments = $OctopusParameters["RegisterAzureCluster.Environment.List"]
$SpaceId = $OctopusParameters["Octopus.Space.Id"]
$MachinePolicyIdOrName = $OctopusParameters["RegisterAzureCluster.MachinePolicy.IdOrName"]
$AzureAccountId = $OctopusParameters["RegisterAzureCluster.Azure.Account"]
$Tenants = $OctopusParameters["RegisterAzureCluster.Tenant.List"]
$DeploymentType = $OctopusParameters["RegisterAzureCluster.Tenant.DeploymentType"]
$WorkerPoolNameOrId = $OctopusParameters["RegisterAzureCluster.WorkerPool.IdOrName"]
$OverwriteExisting = $OctopusParameters["RegisterAzureCluster.Overwrite.Existing"]
$OverwriteExisting = $OverwriteExisting -eq "True"

Write-Host "AKS Name: $RegistrationName"
Write-Host "Resoure Group Name: $ClusterResourceGroup"
Write-Host "Octopus Url: $OctopusUrl"
Write-Host "Role List: $Roles"
Write-Host "Environments: $Environments"
Write-Host "Machine Policy Name or Id: $MachinePolicyIdOrName"
Write-Host "Azure Account Id: $AzureAccountId"
Write-Host "Tenant List: $Tenants"
Write-Host "Deployment Type: $DeploymentType"
Write-Host "Worker Pool Name or Id: $WorkerPoolNameOrId"
Write-Host "Overwrite Existing: $OverwriteExisting"

$header = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$header.Add("X-Octopus-ApiKey", $OctopusAPIKey)

$baseApiUrl = "$OctopusUrl/api"
$baseApiInformation = Invoke-RestMethod $baseApiUrl -Headers $header
if ((Get-Member -InputObject $baseApiInformation.Links -Name "Spaces" -MemberType Properties) -ne $null)
{  	
	$baseApiUrl = "$baseApiUrl/$SpaceId"    
}

Write-Host "Base API Url: $baseApiUrl"

$existingMachineResultsUrl = "$baseApiUrl/machines?partialName=$RegistrationName&skip=0&take=1000"
Write-Host "Attempting to find existing machine with similar name at $existingMachineResultsUrl"
$existingMachineResponse = Invoke-RestMethod $existingMachineResultsUrl -Headers $header
Write-Host $existingMachineResponse

$machineFound = $false
$machineId = $null
foreach ($item in $existingMachineResponse.Items)
{
	if ($item.Name -eq $RegistrationName)
    {
    	$machineFound = $true
        if ($OverwriteExisting)
        {
        	$machineId = $item.Id 
        }
        break
    }
}

if ($machineFound -and $OverwriteExisting -eq $false)
{
	Write-Highlight "Machine already exists, skipping registration"
    Exit 0
}

$roleList = $Roles -split ","
$environmentList = $Environments -split ","
$environmentIdList = @()
Write-Host "Getting the ids for all environments specified"
foreach($environment in $environmentList)
{
	Write-Host "Getting the id for the environment $environment"
    $environmentEscaped = $environment.Replace(" ", "%20")
    $environmentUrl = "$baseApiUrl/environments?skip=0&take=1000&name=$environmentEscaped"
    $environmentResponse = Invoke-RestMethod $environmentUrl -Headers $header 

    $environmentId = $environmentResponse.Items[0].Id
    if ($environmentId -eq $null)
    {
    	Write-Host "The environment $environment cannot be found in this space, exiting"
        exit 1
    }
    Write-Host "The id for environment $environment is $environmentId"
    $environmentIdList += $environmentId
}
$tenantList = $Tenants -split ","
$tenantIdList = @()

foreach($tenant in $tenantList)
{
	if ([string]::IsNullOrWhiteSpace($tenant) -eq $false)
    {    
      Write-Host "Getting the id for tenant $tenant"
      $tenantEscaped = $tenant.Replace(" ", "%20")
      $tenantUrl = "$baseApiUrl/tenants?skip=0&take=1000&name=$tenantEscaped"
      $tenantResponse = Invoke-RestMethod $tenantUrl -Headers $header 

      $tenantId = $tenantResponse.Items[0].Id
      Write-Host "The id for tenant $tenant is $tenantId"
      $tenantIdList += $tenantId
    }
}

$machinePolicyId = $machinePolicyIdOrName
if ($machinePolicyIdOrName.StartsWith("MachinePolicies-") -eq $false)
{
	Write-Host "The machine policy specified $machinePolicyIdOrName appears to be a name"
	$machinePolicyNameEscaped = $machinePolicyIdOrName.Replace(" ", "%20")
	$machinePolicyResponse = Invoke-RestMethod "$baseApiUrl/machinepolicies?partialName=$machinePolicyNameEscaped" -Headers $header
        
    $machinePolicyId = $machinePolicyResponse.Items[0].Id
    Write-Host "The machine policy id is $machinePolicyId"
}

if ([string]::IsNullOrWhiteSpace($machinePolicyId) -eq $true)
{
	Write-Host "The machine policy $machinePolicyIdOrName cannot be found, exiting"
    exit 1
}

$workerPoolId = $WorkerPoolNameOrId
if ([string]::IsNullOrWhiteSpace($workerPoolId) -eq $false -and $workerPoolId.StartsWith("WorkerPools-") -eq $false)
{
	Write-Host "The worker pool $workerPoolId appears to be a name, looking it up"
    $workerPoolNameEscaped = $workerPoolId.Replace(" ", "%20")
    $workerPoolResponse = Invoke-RestMethod "$baseApiUrl/workerpools?partialName=$workerPoolNameEscaped" -Headers $header
    
    $workerPoolId = $workerPoolResponse.Items[0].Id
    Write-Host "The worker pool id is $workerPoolId"
}

$rawRequest = @{
	Id = $machineId;
    MachinePolicyId = $MachinePolicyId;
    Name = $RegistrationName;
	IsDisabled = $false;
	HealthStatus = "Unknown";
	HasLatestCalamari = $true;
	StatusSummary = $null;
	IsInProcess = $true;
	Endpoint = @{
    	Id = $null;
		CommunicationStyle = "Kubernetes";
		Links = $null;
		AccountType = "AzureServicePrincipal";
        ClusterUrl = $null;
        ClusterCertificate = $null;
        SkipTlsVerification = $false;
        DefaultWorkerPoolId = $workerPoolId;
        Authentication = @{
        	AuthenticationType = "KubernetesAzure";
            AccountId = $AzureAccountId;
            ClusterName = $RegistrationName;
            ClusterResourceGroup = $ClusterResourceGroup
        };
    };
	Links = $null;	
	Roles = $roleList;
	EnvironmentIds = $environmentIdList;
	TenantIds = $tenantIdList;
    TenantedDeploymentParticipation = $DeploymentType;
	TenantTags = @()}

$jsonRequest = $rawRequest | ConvertTo-Json -Depth 10

Write-Host "Sending in the request $jsonRequest"

$machineUrl = "$baseApiUrl/machines"
$method = "POST"
if ($OverwriteExisting -and $machineId -ne $null)
{
	$machineUrl = "$machineUrl/$machineId" 
  	$method = "PUT"
}

Write-Host "Posting to url $machineUrl"
$machineResponse = Invoke-RestMethod $machineUrl -Headers $header -Method $method -Body $jsonRequest

Write-Host "Create machine's response: $machineResponse"

Provided under the Apache License version 2.0.

Report an issue

To use this template in Octopus Deploy, copy the JSON below and paste it into the Library → Step templates → Import dialog.

{
  "Id": "eff227d2-2cd6-4d86-90ae-6258cee53d0a",
  "Name": "Register AKS Cluster with Octopus Deploy",
  "Description": "Step template to Register an AKS Cluster with Octopus Deploy using the Octopus Deploy API",
  "Version": 1,
  "ExportedAt": "2020-04-13T15:37:29.866Z",
  "ActionType": "Octopus.Script",
  "Author": "octobob",
  "Packages": [],
  "Parameters": [
    {
      "Id": "e98dc4e2-0766-4d2d-a753-eafe294fdeea",
      "Name": "RegisterAzureCluster.Octopus.Base.Url",
      "Label": "Octopus Base Url",
      "HelpText": "The base url of your Octopus Deploy instance.  Example: https://samples.octopus.app",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "cb3cdd41-3d1f-49c6-820e-acfa24bf5a88",
      "Name": "RegisterAzureCluster.Octopus.Api.Key",
      "Label": "Octopus Api Key",
      "HelpText": "The API key of a user in Octopus Deploy who has permissions to register the cluster.",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "Sensitive"
      }
    },
    {
      "Id": "1d3d8695-27a3-4d3e-9457-6b483253a609",
      "Name": "RegisterAzureCluster.Azure.Account",
      "Label": "Azure Account",
      "HelpText": "The Azure Account with permissions to access the AKS cluster",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "AzureAccount"
      }
    },
    {
      "Id": "ca9d9733-2032-466b-9e80-2aa6abd3c977",
      "Name": "RegisterAzureCluster.AKS.Name",
      "Label": "AKS Cluster Name",
      "HelpText": "The name of the AKS Cluster Name to register with Octopus Deploy.",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "1e3c6a4a-09da-4cd1-989f-93be59ad7f16",
      "Name": "RegisterAzureCluster.ResourceGroup.Name",
      "Label": "AKS Resource Group Name",
      "HelpText": "Name of the Azure Resource Group where the AKS cluster is located.",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "fa4bd89d-bb86-4d3f-87ff-17125cd88f24",
      "Name": "RegisterAzureCluster.Roles.List",
      "Label": "Role CSV List",
      "HelpText": "Comma separated list of environments to assign to the AKS cluster in Octopus Deploy.",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "0c80326d-cdc1-439d-be6b-fbab4da42cda",
      "Name": "RegisterAzureCluster.Environment.List",
      "Label": "Environment CSV List",
      "HelpText": "Comma separated list of environments to assign to the AKS cluster in Octopus Deploy.",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "667a18b3-1694-4333-87a4-9be712b59122",
      "Name": "RegisterAzureCluster.Tenant.List",
      "Label": "Tenant CSV List",
      "HelpText": "(Optional) If this is for a tenant, the a comma separated list of tenants to assign the AKS cluster to in Octopus Deploy",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "db2de612-45bb-4e4a-ab95-64083dd80393",
      "Name": "RegisterAzureCluster.Tenant.DeploymentType",
      "Label": "Tenanted Deployments",
      "HelpText": "Choose the kind of deployment where this deployment target should be included.",
      "DefaultValue": "Untenanted",
      "DisplaySettings": {
        "Octopus.ControlType": "Select",
        "Octopus.SelectOptions": "Untenanted|Exclude from tenanted deployments (default)\nTenanted|Include only in tenanted deployments\nTenantedOrUntenanted|Include in both tenanted and untenanted deployments"
      }
    },
    {
      "Id": "5ef91f37-b13b-413d-955c-872c7f274c7e",
      "Name": "RegisterAzureCluster.MachinePolicy.IdOrName",
      "Label": "Machine Policy Id Or Name",
      "HelpText": "Enter in the name or the Id of the Machine Policy in Octopus Deploy for the AKS Cluster.",
      "DefaultValue": "Default Machine Policy",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "c4c45925-d7a4-4e41-9c2d-a8d73a6292b1",
      "Name": "RegisterAzureCluster.WorkerPool.IdOrName",
      "Label": "Worker Pool Id or Name",
      "HelpText": "The name or id of the worker pool all communication will go through for the K8s cluster.  Leave blank for the default worker pool.",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "94b90acb-a054-4886-91e0-79e9881709f9",
      "Name": "RegisterAzureCluster.Overwrite.Existing",
      "Label": "Overwrite Existing Registration",
      "HelpText": "Indicates if the existing cluster should be overwritten",
      "DefaultValue": "False",
      "DisplaySettings": {
        "Octopus.ControlType": "Checkbox"
      }
    }
  ],
  "Properties": {
    "Octopus.Action.RunOnServer": "true",
    "Octopus.Action.Script.ScriptSource": "Inline",
    "Octopus.Action.Script.Syntax": "PowerShell",
    "Octopus.Action.Script.ScriptBody": "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\n\n$OctopusAPIKey = $OctopusParameters[\"RegisterAzureCluster.Octopus.Api.Key\"]\n$RegistrationName = $OctopusParameters[\"RegisterAzureCluster.AKS.Name\"]\n$ClusterResourceGroup = $OctopusParameters[\"RegisterAzureCluster.ResourceGroup.Name\"]\n$OctopusUrl = $OctopusParameters[\"RegisterAzureCluster.Octopus.Base.Url\"]\n$Roles = $OctopusParameters[\"RegisterAzureCluster.Roles.List\"]\n$Environments = $OctopusParameters[\"RegisterAzureCluster.Environment.List\"]\n$SpaceId = $OctopusParameters[\"Octopus.Space.Id\"]\n$MachinePolicyIdOrName = $OctopusParameters[\"RegisterAzureCluster.MachinePolicy.IdOrName\"]\n$AzureAccountId = $OctopusParameters[\"RegisterAzureCluster.Azure.Account\"]\n$Tenants = $OctopusParameters[\"RegisterAzureCluster.Tenant.List\"]\n$DeploymentType = $OctopusParameters[\"RegisterAzureCluster.Tenant.DeploymentType\"]\n$WorkerPoolNameOrId = $OctopusParameters[\"RegisterAzureCluster.WorkerPool.IdOrName\"]\n$OverwriteExisting = $OctopusParameters[\"RegisterAzureCluster.Overwrite.Existing\"]\n$OverwriteExisting = $OverwriteExisting -eq \"True\"\n\nWrite-Host \"AKS Name: $RegistrationName\"\nWrite-Host \"Resoure Group Name: $ClusterResourceGroup\"\nWrite-Host \"Octopus Url: $OctopusUrl\"\nWrite-Host \"Role List: $Roles\"\nWrite-Host \"Environments: $Environments\"\nWrite-Host \"Machine Policy Name or Id: $MachinePolicyIdOrName\"\nWrite-Host \"Azure Account Id: $AzureAccountId\"\nWrite-Host \"Tenant List: $Tenants\"\nWrite-Host \"Deployment Type: $DeploymentType\"\nWrite-Host \"Worker Pool Name or Id: $WorkerPoolNameOrId\"\nWrite-Host \"Overwrite Existing: $OverwriteExisting\"\n\n$header = New-Object \"System.Collections.Generic.Dictionary[[String],[String]]\"\n$header.Add(\"X-Octopus-ApiKey\", $OctopusAPIKey)\n\n$baseApiUrl = \"$OctopusUrl/api\"\n$baseApiInformation = Invoke-RestMethod $baseApiUrl -Headers $header\nif ((Get-Member -InputObject $baseApiInformation.Links -Name \"Spaces\" -MemberType Properties) -ne $null)\n{  \t\n\t$baseApiUrl = \"$baseApiUrl/$SpaceId\"    \n}\n\nWrite-Host \"Base API Url: $baseApiUrl\"\n\n$existingMachineResultsUrl = \"$baseApiUrl/machines?partialName=$RegistrationName&skip=0&take=1000\"\nWrite-Host \"Attempting to find existing machine with similar name at $existingMachineResultsUrl\"\n$existingMachineResponse = Invoke-RestMethod $existingMachineResultsUrl -Headers $header\nWrite-Host $existingMachineResponse\n\n$machineFound = $false\n$machineId = $null\nforeach ($item in $existingMachineResponse.Items)\n{\n\tif ($item.Name -eq $RegistrationName)\n    {\n    \t$machineFound = $true\n        if ($OverwriteExisting)\n        {\n        \t$machineId = $item.Id \n        }\n        break\n    }\n}\n\nif ($machineFound -and $OverwriteExisting -eq $false)\n{\n\tWrite-Highlight \"Machine already exists, skipping registration\"\n    Exit 0\n}\n\n$roleList = $Roles -split \",\"\n$environmentList = $Environments -split \",\"\n$environmentIdList = @()\nWrite-Host \"Getting the ids for all environments specified\"\nforeach($environment in $environmentList)\n{\n\tWrite-Host \"Getting the id for the environment $environment\"\n    $environmentEscaped = $environment.Replace(\" \", \"%20\")\n    $environmentUrl = \"$baseApiUrl/environments?skip=0&take=1000&name=$environmentEscaped\"\n    $environmentResponse = Invoke-RestMethod $environmentUrl -Headers $header \n\n    $environmentId = $environmentResponse.Items[0].Id\n    if ($environmentId -eq $null)\n    {\n    \tWrite-Host \"The environment $environment cannot be found in this space, exiting\"\n        exit 1\n    }\n    Write-Host \"The id for environment $environment is $environmentId\"\n    $environmentIdList += $environmentId\n}\n$tenantList = $Tenants -split \",\"\n$tenantIdList = @()\n\nforeach($tenant in $tenantList)\n{\n\tif ([string]::IsNullOrWhiteSpace($tenant) -eq $false)\n    {    \n      Write-Host \"Getting the id for tenant $tenant\"\n      $tenantEscaped = $tenant.Replace(\" \", \"%20\")\n      $tenantUrl = \"$baseApiUrl/tenants?skip=0&take=1000&name=$tenantEscaped\"\n      $tenantResponse = Invoke-RestMethod $tenantUrl -Headers $header \n\n      $tenantId = $tenantResponse.Items[0].Id\n      Write-Host \"The id for tenant $tenant is $tenantId\"\n      $tenantIdList += $tenantId\n    }\n}\n\n$machinePolicyId = $machinePolicyIdOrName\nif ($machinePolicyIdOrName.StartsWith(\"MachinePolicies-\") -eq $false)\n{\n\tWrite-Host \"The machine policy specified $machinePolicyIdOrName appears to be a name\"\n\t$machinePolicyNameEscaped = $machinePolicyIdOrName.Replace(\" \", \"%20\")\n\t$machinePolicyResponse = Invoke-RestMethod \"$baseApiUrl/machinepolicies?partialName=$machinePolicyNameEscaped\" -Headers $header\n        \n    $machinePolicyId = $machinePolicyResponse.Items[0].Id\n    Write-Host \"The machine policy id is $machinePolicyId\"\n}\n\nif ([string]::IsNullOrWhiteSpace($machinePolicyId) -eq $true)\n{\n\tWrite-Host \"The machine policy $machinePolicyIdOrName cannot be found, exiting\"\n    exit 1\n}\n\n$workerPoolId = $WorkerPoolNameOrId\nif ([string]::IsNullOrWhiteSpace($workerPoolId) -eq $false -and $workerPoolId.StartsWith(\"WorkerPools-\") -eq $false)\n{\n\tWrite-Host \"The worker pool $workerPoolId appears to be a name, looking it up\"\n    $workerPoolNameEscaped = $workerPoolId.Replace(\" \", \"%20\")\n    $workerPoolResponse = Invoke-RestMethod \"$baseApiUrl/workerpools?partialName=$workerPoolNameEscaped\" -Headers $header\n    \n    $workerPoolId = $workerPoolResponse.Items[0].Id\n    Write-Host \"The worker pool id is $workerPoolId\"\n}\n\n$rawRequest = @{\n\tId = $machineId;\n    MachinePolicyId = $MachinePolicyId;\n    Name = $RegistrationName;\n\tIsDisabled = $false;\n\tHealthStatus = \"Unknown\";\n\tHasLatestCalamari = $true;\n\tStatusSummary = $null;\n\tIsInProcess = $true;\n\tEndpoint = @{\n    \tId = $null;\n\t\tCommunicationStyle = \"Kubernetes\";\n\t\tLinks = $null;\n\t\tAccountType = \"AzureServicePrincipal\";\n        ClusterUrl = $null;\n        ClusterCertificate = $null;\n        SkipTlsVerification = $false;\n        DefaultWorkerPoolId = $workerPoolId;\n        Authentication = @{\n        \tAuthenticationType = \"KubernetesAzure\";\n            AccountId = $AzureAccountId;\n            ClusterName = $RegistrationName;\n            ClusterResourceGroup = $ClusterResourceGroup\n        };\n    };\n\tLinks = $null;\t\n\tRoles = $roleList;\n\tEnvironmentIds = $environmentIdList;\n\tTenantIds = $tenantIdList;\n    TenantedDeploymentParticipation = $DeploymentType;\n\tTenantTags = @()}\n\n$jsonRequest = $rawRequest | ConvertTo-Json -Depth 10\n\nWrite-Host \"Sending in the request $jsonRequest\"\n\n$machineUrl = \"$baseApiUrl/machines\"\n$method = \"POST\"\nif ($OverwriteExisting -and $machineId -ne $null)\n{\n\t$machineUrl = \"$machineUrl/$machineId\" \n  \t$method = \"PUT\"\n}\n\nWrite-Host \"Posting to url $machineUrl\"\n$machineResponse = Invoke-RestMethod $machineUrl -Headers $header -Method $method -Body $jsonRequest\n\nWrite-Host \"Create machine's response: $machineResponse\""
  },
  "Category": "Octopus",
  "HistoryUrl": "https://github.com/OctopusDeploy/Library/commits/master/step-templates//opt/buildagent/work/75443764cd38076d/step-templates/octopus-register-aks-k8s-cluster.json",
  "Website": "/step-templates/eff227d2-2cd6-4d86-90ae-6258cee53d0a",
  "Logo": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAC1QTFRFT6Tl////L5Pg8vj9Y67omsvwPJrisdfzfbzs5fL7y+T32Ov5isLucLXqvt31CJPHWwAABMJJREFUeNrs3deW4jAMAFDF3U75/89dlp0ZhiU4blJEjvQ8hYubLJsA00UCBCIQgQhEIAIRiEAEIhCBCEQgAhGIQAQiEIEIhD8kJm+t+QprfdKfB9HbYpx6CWfspj8HMi+gMgHL/AmQA8W3JTKH+ALFvzCeL0RbpyoCPE9IJeNOSQwh5Z3qd6yRGWQ2qi2cZQWxqj1WzQYSjeoJmJlAklOd4VlArOqPhQEkqBERToeMcfRJBkC0Uep8CfBpjz4JsHJ0zF3dkEWNje0kiB/sUC6eApndaIiCMyAa1PiwJ0AWhRGJHJJQHG2dC7h1rNbO1QOxSA7lNCkkKrQIpJCAB1GREILYIC1NAiwbpKFJgGWDNExcwGstfExcZBCHC6nOglshHtmhViLIig1RNBCN7qjtW8C0Z1UvJcC1Z9XmwMBzzvobmgAyEzgq91dtEEsBsQSQQAFZCSBAATEEEApHZbrVBIkkEIUPSVeB+KtALA0kXQUSrwKZBCIQBnk8Y4i5CsReBeKvkqLM+BCSDWJlrZFvGk9SRTHshkgjZCGAaArIxm3H3grhVzFlW2msfl1ca79UJ1bofYvsDHHlNdTZnlh5MghuPd5NdBDUNZHyCkfktIh03XzALGRPlBDPac7qgWjHZzWcmF5zmmkhidMQ6boKiDXcDTUEaylZqCGJ0Vjvu/fLJtHqhSANEvqb2OYqkOUqEHuVMbJcZdZCGiPhKhC4yjqiIjEE7XThMp8fAWII3mY3kUIQD+AMKQTzPiBhgQ63HlT/KSvgtoi0dq5mCPah1UIE0eh3sT0NhOByvKeAkFzi8PgQomumFhsyOxpIzZN4gLOj5plVwNpR0b2AuePWKBEHQu24pSsJA+LVCeHHQxZ1SiyDIdqok8IOhSSnTottHEQTdyt4ettAj4KkzA4dMikk2Dht2S5ptm1vswnPDxn0YyDZ5oDM3iToo2T5voWaYe+Q+vdjH80QyAzZhCgcDtLMI1Tmtz9w++XHgziHQHJJu/OZ3bs9Xn8gQ72NcP3dKqEfkp10F51xhoIi2I91R+LurXV/5q7pH+wx061CzO16oSQleMyr8fXvwMA0Pro8432DPD/ySx8XrHfSuDAM8n6UhnjQabaiXf5Bq/lREHvEeNtn1rJ08+C/uXkQZHeguxAPC3UvtcJYUogLzZX5hhZZvS6onG5lxXtzWGaygwb79vT/IXhdlNibwlKYOR6T8xjI7W8n+xV7T+GH4tMzWwR+lZhRkJYSsC0thpmCYqyngOz3rN2FLBZ2wZflBCggUHF0Vnp88JKienzIXLSEZCZqU7IKr/gQW9yx3pzV7Y9kvWZWTRRIqDmTtRUnU7b2lLcTYmoqHqnmiO1poER0SPkAeZMAZxaJx0Y3TCdAclsIqDz03ALcyxfTCZBsthoGXWmigGyVhWPLFJJfuuKQWycoEFdXbH4dJJoJxNR1eD/kshz6yn48cF8yW8sFoitflB1w6Q8n+/15Za7oA17/pYNmYgP5fmWm8L1NOHPWgK8kuFew1/JXtOA0yJCv7ah7X8ObUuT5kObU30+fDZm8+zqP+HTIpK0xQ796b5Kv2hSIQAQiEIEIRCACEYhABCIQgQhEIAIRiEAEIpBf8UeAAQAEjtYmlDTcCgAAAABJRU5ErkJggg==",
  "$Meta": {
    "Type": "ActionTemplate"
  }
}

History

Page updated on Monday, April 13, 2020