containerservice

package
v0.0.0-...-e747c7c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL