Skip to content

Commit

Permalink
[AKS] fix the aks browse in cloud shell. (#12174)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyliuliming committed Feb 18, 2020
1 parent 5edbd82 commit 99daea9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/azure-cli/azure/cli/command_modules/acs/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1550,11 +1550,13 @@ def aks_browse(cmd, client, resource_group_name, name, disable_browser=False,
# TODO: better error handling here.
response = requests.post('http://localhost:8888/openport/{0}'.format(listen_port))
result = json.loads(response.text)
dashboardURL = '{0}api/v1/namespaces/kube-system/services/{1}:kubernetes-dashboard:/proxy'.format(result['url'],
protocol)
term_id = os.environ.get('ACC_TERM_ID')
if term_id:
response = requests.post('http://localhost:8888/openLink/{}'.format(term_id),
json={"url": result['url']})
logger.warning('To view the console, please open %s in a new tab', result['url'])
json={"url": dashboardURL})
logger.warning('To view the console, please open %s in a new tab', dashboardURL)
else:
logger.warning('Proxy running on %s', proxy_url)

Expand Down

0 comments on commit 99daea9

Please sign in to comment.