Bearbeiten

Freigeben über


Install-AzAksCliTool

Download and install kubectl and kubelogin.

Syntax

Install-AzAksCliTool
       [-Destination <String>]
       [-Version <String>]
       [-DownloadFromMirror]
       [-KubeloginInstallDestination <String>]
       [-KubeloginInstallVersion <String>]
       [-KubeloginDownloadFromMirror]
       [-PassThru]
       [-AsJob]
       [-Force]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

Download and install kubectl and kubelogin.

Examples

Example 1: Install the lateset version of kubectl and kubelogin

Install-AzAksCliTool

Example 2: Install the special version of kubectl and kubelogin into custom folder

Install-AzAksCliTool -KubectlInstallVersion "v1.25.0" -KubectlInstallDestination "~/bin/" -KubeloginInstallVersion "v0.0.20" -KubeloginInstallDestination "~/bin"

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Destination

Path at which to install kubectl. Default to install into ~/.azure-kubectl/

Type:String
Aliases:KubectlInstallDestination
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DownloadFromMirror

Download from mirror site : https://mirror.azure.cn/kubernetes/kubectl/

Type:SwitchParameter
Aliases:KubectlDownloadFromMirror
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Overwrite existing kubectl and kubelogin without prompt

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KubeloginDownloadFromMirror

Download from mirror site : https://mirror.azure.cn/kubernetes/kubelogin

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KubeloginInstallDestination

Path at which to install kubectl. Default to install into ~/.azure-kubelogin/

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KubeloginInstallVersion

Version of kubectl to install, e.g. 'v0.0.20'. Default value: Latest

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Wait for .NET debugger to attach

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Version

Version of kubectl to install, e.g. 'v1.17.2'. Default value: Latest.

Type:String
Aliases:KubectlInstallVersion
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Boolean