diff --git a/articles/bastion/bastion-connect-to-aks-private-cluster.md b/articles/bastion/bastion-connect-to-aks-private-cluster.md index 005a8fe18f825..6a3d57b28b1bc 100644 --- a/articles/bastion/bastion-connect-to-aks-private-cluster.md +++ b/articles/bastion/bastion-connect-to-aks-private-cluster.md @@ -51,34 +51,38 @@ To connect to your AKS private cluster: 1. Sign in to your Azure account using `az login` via CLI. If you have more than one subscription, you can view them using `az account list` and select the subscription containing your Bastion resource using: - ```pwsh + ```azurecli az account set --subscription ``` 1. Retrieve credentials to your AKS private cluster: - ```pwsh + ```azurecli az aks get-credentials --admin --name --resource-group ``` 1. Open the tunnel to your target AKS Cluster with either of the following commands: - ```pwsh + ```azurecli az aks bastion --name --resource-group --admin --bastion ``` Or: - ```pwsh + ```azurecli az network bastion tunnel --name --resource-group --target-resource-id --resource-port 443 --port ``` 1. If you're using the az network command, open a new command line to connect to the AKS cluster via the Bastion tunnel. Otherwise, you should be all set to interact with your AKS cluster. - ```pwsh - kubectl get pods --server=https://localhost: + ```bash + kubectl get pods ``` +> [!NOTE] +> For aks-preview versions 19.0.0b15 and below, you have to specify the `--server=https://localhost:` on all `kubectl` commands. +> You can check the version of your aks-preview extension by running `az extension show -n aks-preview` + ## Next steps Read the [Bastion FAQ](bastion-faq.md) for more connection information.