Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to
Pending
+++++++

18.0.0b21
+++++++
* Add command `az aks bastion` to enable connections to managed Kubernetes clusters via Azure Bastion.

18.0.0b20
+++++++
* Fix the bug affecting VMAS to VMS migration in the `az aks update` command using the `--migrate-vmas-to-vms` option.
Expand Down
21 changes: 21 additions & 0 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -3864,3 +3864,24 @@
- name: Show details of a load balancer configuration in table format
text: az aks loadbalancer show -g MyResourceGroup -n kubernetes --cluster-name MyManagedCluster -o table
"""

helps['aks bastion'] = """
type: command
short-summary: Connect to a managed Kubernetes cluster using Azure Bastion.
long-summary: The command will launch a subshell with the kubeconfig set to connect to the cluster via Bastion. Use exit or Ctrl-D (i.e. EOF) to exit the subshell.
parameters:
- name: --bastion
type: string
short-summary: The name or resource ID of a pre-deployed Bastion resource configured to connect to the current AKS cluster.
long-summary: If not specified, the command will try to identify an existing Bastion resource within the cluster's node resource group.
- name: --port
type: int
short-summary: The local port number used for the bastion connection.
long-summary: If not provided, a random port will be used.
- name: --admin
type: bool
short-summary: Use the cluster admin credentials to connect to the bastion.
examples:
- name: Connect to a managed Kubernetes cluster using Azure Bastion with custom port and admin credentials.
text: az aks bastion -g MyResourceGroup --name MyManagedCluster --bastion MyBastionResource --port 50001 --admin
"""
11 changes: 11 additions & 0 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,17 @@ def load_arguments(self, _):
help="Name of the load balancer configuration. Required.",
)

with self.argument_context("aks bastion") as c:
c.argument("bastion")
c.argument("port", type=int)
c.argument("admin", action="store_true")
c.argument(
"yes",
options_list=["--yes", "-y"],
help="Do not prompt for confirmation.",
action="store_true",
)


def _get_default_install_location(exe_name):
system = platform.system()
Expand Down
Empty file.
Loading
Loading