Skip to content

Commit 7b38431

Browse files
committed
Last ones
1 parent 96da93b commit 7b38431

File tree

2 files changed

+67
-83
lines changed

2 files changed

+67
-83
lines changed
Lines changed: 66 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,123 @@
11
---
22
title: Access the Kubernetes Dashboard in Azure Stack Hub
3-
description: Learn how to access the Kubernetes Dashboard in Azure Stack Hub
3+
description: Learn how to access the Kubernetes Dashboard in Azure Stack Hub.
44
author: sethmanheim
55
ms.topic: article
6-
ms.date: 2/1/2021
7-
ms.author: sethm
8-
ms.reviewer: waltero
6+
ms.date: 01/23/2025
7+
ms.author: sethm
98
ms.lastreviewed: 06/18/2019
109

1110
# Intent: As an Azure Stack user, I want to access the Kubernetes dashboard from Azure Stack for basic management operations.
1211
# Keyword: azure stack kubernetes dashboard
1312

1413
---
1514

16-
# Access the Kubernetes Dashboard in Azure Stack Hub
15+
# Access the Kubernetes Dashboard in Azure Stack Hub
1716

18-
> [!NOTE]
17+
> [!NOTE]
1918
> Only use the Kubernetes Azure Stack Marketplace item to deploy clusters as a proof-of-concept. For supported Kubernetes clusters on Azure Stack, use [the AKS engine](azure-stack-kubernetes-aks-engine-overview.md).
2019
2120
Kubernetes includes a web dashboard that you can use for basic management operations. This dashboard lets you view basic health status and metrics for your applications, create and deploy services, and edit existing applications. This article shows you how to set up the Kubernetes dashboard on Azure Stack Hub.
2221

2322
## Prerequisites for Kubernetes Dashboard
2423

25-
* Azure Stack Hub Kubernetes cluster
26-
27-
You will need to have deployed a Kubernetes cluster to Azure Stack Hub. For more information, see [Deploy Kubernetes](azure-stack-solution-template-kubernetes-deploy.md).
28-
29-
* SSH client
30-
31-
You'll need an SSH client to security connect to your control plane node in the cluster. If you're using Windows, you can use [Putty](https://www.ssh.com/ssh/putty/download). You will need the private key used when you deployed your Kubernetes cluster.
32-
33-
* FTP (PSCP)
34-
35-
You may also need an FTP client that supports SSH and SSH File Transfer Protocol to transfer the certificates from the control plane node to your Azure Stack Hub management machine. You can use [FileZilla](https://filezilla-project.org/download.php?type=client). You will need the private key used when you deployed your Kubernetes cluster.
24+
- Azure Stack Hub Kubernetes cluster: a Kubernetes cluster deployed to Azure Stack Hub. For more information, see [Deploy Kubernetes](azure-stack-solution-template-kubernetes-deploy.md).
25+
- SSH client: an SSH client to security connect to your control plane node in the cluster. If you use Windows, you can use [Putty](https://www.ssh.com/ssh/putty/download). You need the private key that you used when you deployed your Kubernetes cluster.
26+
- FTP (PSCP): an FTP client that supports SSH and the SSH File Transfer Protocol to transfer the certificates from the control plane node to your Azure Stack Hub management machine. You can use [FileZilla](https://filezilla-project.org/download.php?type=client). You need the private key that you used when you deployed your Kubernetes cluster.
3627

3728
## Overview of steps to enable dashboard
3829

39-
1. Export the Kubernetes certificates from the control plane node in the cluster.
40-
2. Import the certificates to your Azure Stack Hub management machine.
41-
2. Open the Kubernetes web dashboard.
30+
1. Export the Kubernetes certificates from the control plane node in the cluster.
31+
1. Import the certificates to your Azure Stack Hub management machine.
32+
1. Open the Kubernetes web dashboard.
4233

43-
## Export certificate from the master
34+
## Export certificate from the master
4435

4536
You can retrieve the URL for the dashboard from the control plane node in your cluster.
4637

47-
1. Get the public IP address and username for your cluster master from the Azure Stack Hub dashboard. To get this information:
48-
49-
- Sign in to the Azure Stack Hub portal `https://portal.local.azurestack.external/`.
50-
- Select **All services** > **All resources**. Find the master in your cluster resource group. The master is named `k8s-master-<sequence-of-numbers>`.
38+
1. Get the public IP address and username for your main cluster from the Azure Stack Hub dashboard. To get this information:
5139

52-
2. Open the control plane node in the portal. Copy the **Public IP** address. Click **Connect** to get your user name in the **Login using VM local account** box. This is the same user name you set when creating your cluster. Use the public IP address rather than the private IP address listed in the connect blade.
40+
- Sign in to the Azure Stack Hub portal at `https://portal.local.azurestack.external/`.
41+
- Select **All services** > **All resources**. Find the master in your cluster resource group. The master is named `k8s-master-<sequence-of-numbers>`.
5342

54-
3. Open an SSH client to connect to the master. If you are working on Windows, you can use [Putty](https://www.ssh.com/ssh/putty/download) to create the connection. You will use the public IP address for the control plane node, the username, and add the private key you used when creating the cluster.
43+
1. Open the control plane node in the portal. Copy the **Public IP** address. Select **Connect** to get your user name in the **Login using VM local account** box. This is the same user name you set when you created your cluster. Use the public IP address rather than the private IP address listed in the connect blade.
44+
1. Open an SSH client to connect to the main cluster. If you use Windows, you can use [Putty](https://www.ssh.com/ssh/putty/download) to create the connection. You use the public IP address for the control plane node, the username, and add the private key you used when you created the cluster.
45+
1. When the terminal connects, type `kubectl` to open the Kubernetes command-line client.
46+
1. Run the following command:
5547

56-
4. When the terminal connects, type `kubectl` to open the Kubernetes command-line client.
48+
```bash
49+
kubectl cluster-info
50+
```
5751

58-
5. Run the following command:
52+
Find the URL for the dashboard. For example: `https://k8-1258.local.cloudapp.azurestack.external/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy`
5953

60-
```Bash
61-
kubectl cluster-info
62-
```
63-
Find the URL for the dashboard. For example: `https://k8-1258.local.cloudapp.azurestack.external/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy`
54+
1. Extract the self-signed certificate and convert it to the PFX format. Run the following command:
6455

65-
6. Extract the self-signed cert and convert it to the PFX format. Run the following command:
56+
```bash
57+
sudo su
58+
openssl pkcs12 -export -out /etc/kubernetes/certs/client.pfx -inkey /etc/kubernetes/certs/client.key -in /etc/kubernetes/certs/client.crt -certfile /etc/kubernetes/certs/ca.crt
59+
```
6660

67-
```Bash
68-
sudo su
69-
openssl pkcs12 -export -out /etc/kubernetes/certs/client.pfx -inkey /etc/kubernetes/certs/client.key -in /etc/kubernetes/certs/client.crt -certfile /etc/kubernetes/certs/ca.crt
70-
```
61+
1. Get the list of secrets in the **kube-system** namespace. Run the following command:
7162

72-
7. Get the list of secrets in the **kube-system** namespace. Run the following command:
63+
```bash
64+
kubectl -n kube-system get secrets
65+
```
7366

74-
```Bash
75-
kubectl -n kube-system get secrets
76-
```
67+
Make note of the kubernetes-dashboard-token-\<XXXXX> value.
7768

78-
Make note of the kubernetes-dashboard-token-\<XXXXX> value.
69+
1. Get the token and save it. Update the `kubernetes-dashboard-token-<####>` with the secret value from the previous step:
7970

80-
8. Get the token and save it. Update the `kubernetes-dashboard-token-<####>` with the secret value from the previous step.
81-
82-
```Bash
83-
kubectl -n kube-system describe secret kubernetes-dashboard-token-<####>| awk '$1=="token:"{print $2}'
84-
```
71+
```bash
72+
kubectl -n kube-system describe secret kubernetes-dashboard-token-<####>| awk '$1=="token:"{print $2}'
73+
```
8574

8675
## Import the certificate
8776

88-
1. Open Filezilla and connect to the control plane node. You will need the:
89-
90-
- the control plane node public IP
91-
- the username
92-
- the private secret
93-
- Use **SFTP - SSH File Transfer Protocol**
94-
95-
2. Copy `/etc/kubernetes/certs/client.pfx` and `/etc/kubernetes/certs/ca.crt` to your Azure Stack Hub management machine.
77+
1. Open Filezilla and connect to the control plane node. You need the following information:
9678

97-
3. Make note of the file locations. Update the script with the locations, and then open PowerShell with an elevated prompt. Run the updated script:
79+
- Control plane node public IP
80+
- Username
81+
- Private secret
82+
- Use **SFTP - SSH File Transfer Protocol**
9883

99-
```powershell
100-
Import-Certificate -Filepath "ca.crt" -CertStoreLocation cert:\LocalMachine\Root
101-
$pfxpwd = Get-Credential -UserName 'Enter password below' -Message 'Enter password below'
102-
Import-PfxCertificate -Filepath "client.pfx" -CertStoreLocation cert:\CurrentUser\My -Password $pfxpwd.Password
103-
```
84+
1. Copy `/etc/kubernetes/certs/client.pfx` and `/etc/kubernetes/certs/ca.crt` to your Azure Stack Hub management machine.
85+
1. Make a note of the file locations. Update the script with the locations, and then open PowerShell with an elevated prompt. Run the updated script:
10486

105-
## Open the Kubernetes dashboard
87+
```powershell
88+
Import-Certificate -Filepath "ca.crt" -CertStoreLocation cert:\LocalMachine\Root
89+
$pfxpwd = Get-Credential -UserName 'Enter password below' -Message 'Enter password below'
90+
Import-PfxCertificate -Filepath "client.pfx" -CertStoreLocation cert:\CurrentUser\My -Password $pfxpwd.Password
91+
```
10692

107-
1. Disable the pop-up blocker on your Web browser.
93+
## Open the Kubernetes dashboard
10894

109-
2. Point your browser to the URL noted when you ran the command `kubectl cluster-info`. For example:
110-
https:\//azurestackdomainnamefork8sdashboard/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy
111-
3. Select the client certificate.
112-
4. Enter the token.
113-
5. Reconnect to the bash command line on the control plane node and give permissions to `kubernetes-dashboard`. Run the following command:
95+
1. Disable the pop-up blocker on your web browser.
96+
1. Point your browser to the URL noted when you ran the command `kubectl cluster-info`; for example, `https://azurestackdomainnamefork8sdashboard/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy`.
97+
1. Select the client certificate.
98+
1. Enter the token.
99+
1. Reconnect to the bash command line on the control plane node and give permissions to `kubernetes-dashboard`. Run the following command:
114100

115-
```Bash
116-
kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
117-
```
101+
```bash
102+
kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
103+
```
118104

119-
The script gives `kubernetes-dashboard` Cloud administrator privileges. For more information, see [For RBAC-enabled clusters](/azure/aks/kubernetes-dashboard).
105+
The script gives `kubernetes-dashboard` cloud administrator privileges. For more information, see [For RBAC-enabled clusters](/azure/aks/kubernetes-dashboard).
120106

121-
You can use the dashboard. For more information on the Kubernetes dashboard, see [Kubernetes Web UI Dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/)
107+
You can now use the dashboard. For more information about the Kubernetes dashboard, see [Kubernetes Web UI Dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/).
122108

123109
![Azure Stack Hub Kubernetes Dashboard](media/azure-stack-solution-template-kubernetes-dashboard/azure-stack-kub-dashboard.png)
124110

125111
## Troubleshooting
126112

127113
### Custom Virtual Networks
128114

129-
If you face connectivity issues accessing the Kubernetes dashboard after you deploy Kubernetes to a [custom virtual network](./kubernetes-aks-engine-custom-vnet.md), ensure that target subnets are linked to the route table and network security group resources that were created by the AKS engine.
130-
131-
Make sure that the network security group rules allow communication between the control plane nodes and the Kubernetes dashboard pod IP. This can be validated by using the ping command from a control plane node.
132-
133-
## Next steps
115+
If you encounter connectivity issues accessing the Kubernetes dashboard after you deploy Kubernetes to a [custom virtual network](./kubernetes-aks-engine-custom-vnet.md), ensure that target subnets are linked to the route table and network security group resources that were created by the AKS engine.
134116

135-
[Deploy Kubernetes to Azure Stack Hub](azure-stack-solution-template-kubernetes-deploy.md)
117+
Make sure that the network security group rules allow communication between the control plane nodes and the Kubernetes dashboard pod IP. You can validate this permission by using the `ping` command from a control plane node.
136118

137-
[Add a Kubernetes cluster to the Marketplace (for the Azure Stack Hub operator)](../operator/azure-stack-solution-template-kubernetes-cluster-add.md)
119+
## Next steps
138120

139-
[Kubernetes on Azure](/azure/container-service/kubernetes/container-service-kubernetes-walkthrough)
121+
- [Deploy Kubernetes to Azure Stack Hub](azure-stack-solution-template-kubernetes-deploy.md)
122+
- [Add a Kubernetes cluster to the Marketplace (for the Azure Stack Hub operator)](../operator/azure-stack-solution-template-kubernetes-cluster-add.md)
123+
- [Kubernetes on Azure](/azure/container-service/kubernetes/container-service-kubernetes-walkthrough)

azure-stack/user/instance-metadata-service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Azure Instance Metadata Service in Azure Stack Hub
33
description: Learn about the Azure Instance Metadata Service in Azure Stack Hub.
44
author: sethmanheim
55
ms.topic: article
6-
ms.date: 02/08/2022
6+
ms.date: 01/23/2025
77
ms.author: sethm
88
ms.reviewer: thoroet
99
ms.lastreviewed: 02/08/2022

0 commit comments

Comments
 (0)