Install-AzAksCliTool
Download and install kubectl and kubelogin.
Syntax
Default (Default)
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 latest version of kubectl and kubelogin
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
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Destination
Path at which to install kubectl.
Default to install into ~/.azure-kubectl/
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: KubectlInstallDestination
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DownloadFromMirror
Download from mirror site : https://mirror.azure.cn/kubernetes/kubectl/
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: KubectlDownloadFromMirror
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Force
Overwrite existing kubectl and kubelogin without prompt
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KubeloginDownloadFromMirror
Download from mirror site : https://mirror.azure.cn/kubernetes/kubelogin
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KubeloginInstallDestination
Path at which to install kubectl.
Default to install into ~/.azure-kubelogin/
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-KubeloginInstallVersion
Version of kubectl to install, e.g.
'v0.0.20'.
Default value: Latest
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-PassThru
Wait for .NET debugger to attach
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Version
Version of kubectl to install, e.g.
'v1.17.2'.
Default value: Latest.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: KubectlInstallVersion
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs