Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Import-AzAksCredential
- Module:
- Az.Aks Module
Import and merge Kubectl config for a managed Kubernetes Cluster.
Syntax
GroupNameParameterSet (Default)
Import-AzAksCredential
[-ResourceGroupName] <String>
[-Name] <String>
[-Admin]
[-ConfigPath <String>]
[-PublicFqdn]
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
InputObjectParameterSet
Import-AzAksCredential
-InputObject <PSKubernetesCluster>
[-Admin]
[-ConfigPath <String>]
[-PublicFqdn]
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
IdParameterSet
Import-AzAksCredential
[-Id] <String>
[-Admin]
[-ConfigPath <String>]
[-PublicFqdn]
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-SubscriptionId <String>]
[<CommonParameters>]
Description
Import and merge Kubectl config for a managed Kubernetes Cluster.
Examples
Example 1: Import and merge Kubectl config
Import-AzAksCredential -ResourceGroupName group -Name myCluster
Parameters
-Admin
Get the 'clusterAdmin' kubectl config instead of the default 'clusterUser'.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ConfigPath
A kubectl config file to create or update. Use '-' to print YAML to stdout instead. Default: %Home%/.kube/config.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-Force
Import Kubernetes config even if it is the default
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Id
Id of a managed Kubernetes cluster
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ResourceId |
Parameter sets
-InputObject
A PSKubernetesCluster object, normally passed through the pipeline.
Parameter properties
| Type: | PSKubernetesCluster |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Name of your managed Kubernetes cluster
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PassThru
Returns true if import is successful
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PublicFqdn
Get private cluster credential with server address to be public fqdn.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
Resource group name
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SubscriptionId
The ID of the subscription. By default, cmdlets are executed in the subscription that is set in the current context. If the user specifies another subscription, the current cmdlet is executed in the subscription specified by the user. Overriding subscriptions only take effect during the lifecycle of the current cmdlet. It does not change the subscription in the context, and does not affect subsequent cmdlets.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
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.
Inputs
PSKubernetesCluster
String
Outputs
String
Azure PowerShell
Feedback
Was this page helpful?
