Documentation ¶
Index ¶
- func CreateAKS(ctx context.Context, ...) (c containerservice.ManagedCluster, err error)
- func DeleteAKS(ctx context.Context, resourceGroupName, resourceName string) (c containerservice.ManagedClustersDeleteFuture, err error)
- func GetAKS(ctx context.Context, resourceGroupName, resourceName string) (c containerservice.ManagedCluster, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAKS ¶
func CreateAKS(ctx context.Context, resourceName, location, resourceGroupName, username, sshPublicKeyPath, clientID, clientSecret string, agentPoolCount int32) (c containerservice.ManagedCluster, err error)
CreateAKS creates a new managed Kubernetes cluster
Example ¶
helpers.SetResourceGroupName("CreateAKS") ctx := context.Background() defer resources.Cleanup(ctx) _, err := resources.CreateGroup(ctx, helpers.ResourceGroupName()) if err != nil { helpers.PrintAndLog(err.Error()) } _, err = CreateAKS(ctx, resourceName, helpers.Location(), helpers.ResourceGroupName(), username, sshPublicKeyPath, clientID, clientSecret, agentPoolCount) if err != nil { helpers.PrintAndLog(err.Error()) } helpers.PrintAndLog("created AKS cluster") _, err = GetAKS(ctx, helpers.ResourceGroupName(), resourceName) if err != nil { helpers.PrintAndLog(err.Error()) } helpers.PrintAndLog("retrieved AKS cluster") _, err = DeleteAKS(ctx, helpers.ResourceGroupName(), resourceName) if err != nil { helpers.PrintAndLog(err.Error()) } helpers.PrintAndLog("deleted AKS cluster")
Output: created AKS cluster retrieved AKS cluster deleted AKS cluster
func DeleteAKS ¶
func DeleteAKS(ctx context.Context, resourceGroupName, resourceName string) (c containerservice.ManagedClustersDeleteFuture, err error)
DeleteAKS deletes an existing AKS cluster
func GetAKS ¶
func GetAKS(ctx context.Context, resourceGroupName, resourceName string) (c containerservice.ManagedCluster, err error)
GetAKS returns an existing AKS cluster given a resource group name and resource name
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.