Skip to content

Commit 9967e68

Browse files
committed
UX updates
1 parent b562917 commit 9967e68

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3868,6 +3868,7 @@
38683868
helps['aks bastion'] = """
38693869
type: command
38703870
short-summary: Connect to a managed Kubernetes cluster using Azure Bastion.
3871+
long-summary: The command would 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.
38713872
parameters:
38723873
- name: --bastion
38733874
type: string

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ async def _aks_bastion_launch_subshell(kubeconfig_path, port):
281281
updated_shell_cmd,
282282
kubeconfig_path,
283283
)
284+
logger.warning(
285+
"Use exit or Ctrl-D (i.e. EOF) to exit the subshell."
286+
)
284287
subshell_process = await asyncio.subprocess.create_subprocess_shell(
285288
cmd=updated_shell_cmd,
286289
stdin=None,
@@ -327,7 +330,7 @@ async def _aks_bastion_launch_tunnel(bastion_resource, port, mc_id):
327330
f"{az_cmd_name} network bastion tunnel --resource-group {bastion_resource.resource_group} "
328331
f"--name {bastion_resource.name} --port {port} --target-resource-id {mc_id} --resource-port 443"
329332
)
330-
logger.debug("Creating bastion tunnel with command: %s", cmd)
333+
logger.warning("Creating bastion tunnel with command: '%s'", cmd)
331334
tunnel_proces = await asyncio.create_subprocess_exec(
332335
*(cmd.split()),
333336
stdin=asyncio.subprocess.DEVNULL,

0 commit comments

Comments
 (0)