Skip to content

Commit

Permalink
[AKS] fix az aks browse if dashboard isn't prefixed by "pods/" (Azu…
Browse files Browse the repository at this point in the history
…re#5462)

* [AKS] fix `az aks browse` if dashboard isn't prefixed by "pods/"

* Update HISTORY.rst
  • Loading branch information
mboersma authored and Lukasz Stempniewicz committed Feb 21, 2018
1 parent f395366 commit f89dbf4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/command_modules/azure-cli-acs/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Release History
2.0.26
++++++
* `aks create` VM node size default changed from "Standard_D1_v2" to "Standard_DS1_v2"
* improve reliability when locating the dashboard pod for `az aks browse`

2.0.25
++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1236,8 +1236,8 @@ def aks_browse(cmd, client, resource_group_name, name, disable_browser=False):
except subprocess.CalledProcessError as err:
raise CLIError('Could not find dashboard pod: {}'.format(err))
if dashboard_pod:
# remove the "pods/" prefix from the name
dashboard_pod = str(dashboard_pod)[5:].strip()
# remove any "pods/" or "pod/" prefix from the name
dashboard_pod = str(dashboard_pod).split('/')[-1].strip()
else:
raise CLIError("Couldn't find the Kubernetes dashboard pod.")
# launch kubectl port-forward locally to access the remote dashboard
Expand Down

0 comments on commit f89dbf4

Please sign in to comment.