Skip to content

Commit ecb6680

Browse files
authored
update (#8912)
1 parent ec3cf51 commit ecb6680

File tree

9 files changed

+585
-10
lines changed

9 files changed

+585
-10
lines changed

src/aks-preview/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ To release a new version, please select a new version number (usually plus 1 to
1212
Pending
1313
+++++++
1414

15+
18.0.0b21
16+
+++++++
17+
* Add command `az aks bastion` to enable connections to managed Kubernetes clusters via Azure Bastion.
18+
1519
18.0.0b20
1620
+++++++
1721
* Fix the bug affecting VMAS to VMS migration in the `az aks update` command using the `--migrate-vmas-to-vms` option.

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,3 +3864,24 @@
38643864
- name: Show details of a load balancer configuration in table format
38653865
text: az aks loadbalancer show -g MyResourceGroup -n kubernetes --cluster-name MyManagedCluster -o table
38663866
"""
3867+
3868+
helps['aks bastion'] = """
3869+
type: command
3870+
short-summary: Connect to a managed Kubernetes cluster using Azure Bastion.
3871+
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.
3872+
parameters:
3873+
- name: --bastion
3874+
type: string
3875+
short-summary: The name or resource ID of a pre-deployed Bastion resource configured to connect to the current AKS cluster.
3876+
long-summary: If not specified, the command will try to identify an existing Bastion resource within the cluster's node resource group.
3877+
- name: --port
3878+
type: int
3879+
short-summary: The local port number used for the bastion connection.
3880+
long-summary: If not provided, a random port will be used.
3881+
- name: --admin
3882+
type: bool
3883+
short-summary: Use the cluster admin credentials to connect to the bastion.
3884+
examples:
3885+
- name: Connect to a managed Kubernetes cluster using Azure Bastion with custom port and admin credentials.
3886+
text: az aks bastion -g MyResourceGroup --name MyManagedCluster --bastion MyBastionResource --port 50001 --admin
3887+
"""

src/aks-preview/azext_aks_preview/_params.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,6 +2761,17 @@ def load_arguments(self, _):
27612761
help="Name of the load balancer configuration. Required.",
27622762
)
27632763

2764+
with self.argument_context("aks bastion") as c:
2765+
c.argument("bastion")
2766+
c.argument("port", type=int)
2767+
c.argument("admin", action="store_true")
2768+
c.argument(
2769+
"yes",
2770+
options_list=["--yes", "-y"],
2771+
help="Do not prompt for confirmation.",
2772+
action="store_true",
2773+
)
2774+
27642775

27652776
def _get_default_install_location(exe_name):
27662777
system = platform.system()

src/aks-preview/azext_aks_preview/bastion/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)