|
66 | 66 | </a-timeline> |
67 | 67 | </a-card> |
68 | 68 | <a-card :title="$t('label.kubernetes.dashboard')"> |
| 69 | + <p><strong>Note:</strong> CloudStack Kubernetes clusters use <strong>Headlamp</strong> dashboard (deployed in <code>kube-system</code> namespace). For backward compatibility with older clusters using Kubernetes Dashboard, please check your cluster configuration.</p> |
69 | 70 | <a-timeline> |
70 | 71 | <a-timeline-item> |
71 | 72 | <p> |
72 | | - {{ $t('label.run.proxy.locally') }}<br><br> |
73 | | - <code><b>kubectl --kubeconfig /custom/path/kube.conf proxy</b></code> |
| 73 | + <strong>Access Headlamp Dashboard (new clusters)</strong><br><br> |
| 74 | + <strong>Step 1:</strong> Run port-forward command:<br> |
| 75 | + <code><b>kubectl --kubeconfig /custom/path/kube.conf port-forward -n kube-system service/headlamp 8080:80</b></code><br><br> |
| 76 | + <strong>Step 2:</strong> Open in your browser:<br> |
| 77 | + <a href="http://localhost:8080"><code>http://localhost:8080</code></a> |
74 | 78 | </p> |
75 | 79 | </a-timeline-item> |
76 | 80 | <a-timeline-item> |
77 | 81 | <p> |
78 | | - {{ $t('label.open.url') }}<br><br> |
| 82 | + <strong>Access Kubernetes Dashboard (legacy clusters)</strong><br><br> |
| 83 | + <strong>Step 1:</strong> {{ $t('label.run.proxy.locally') }}<br> |
| 84 | + <code><b>kubectl --kubeconfig /custom/path/kube.conf proxy</b></code><br><br> |
| 85 | + <strong>Step 2:</strong> {{ $t('label.open.url') }}<br> |
79 | 86 | <a href="http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/"><code>http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/</code></a> |
80 | 87 | </p> |
81 | 88 | </a-timeline-item> |
82 | 89 | <a-timeline-item> |
| 90 | + <p> |
| 91 | + <strong>Create Access Token for Headlamp (new clusters)</strong> |
| 92 | + </p> |
83 | 93 | <p v-html="$t('label.kubernetes.dashboard.create.token')"></p> |
84 | 94 | <p v-html="$t('label.kubernetes.dashboard.create.token.desc')"></p> |
85 | | - <a-textarea :value="'kubectl --kubeconfig /custom/path/kube.conf apply -f - <<EOF\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: kubernetes-dashboard-admin-user\n namespace: kubernetes-dashboard\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n name: kubernetes-dashboard-admin-user\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: cluster-admin\nsubjects:\n- kind: ServiceAccount\n name: kubernetes-dashboard-admin-user\n namespace: kubernetes-dashboard\n---\napiVersion: v1\nkind: Secret\ntype: kubernetes.io/service-account-token\nmetadata:\n name: kubernetes-dashboard-token\n namespace: kubernetes-dashboard\n annotations:\n kubernetes.io/service-account.name: kubernetes-dashboard-admin-user\nEOF'" :rows="10" readonly /> |
| 95 | + <a-textarea :value="'kubectl --kubeconfig /custom/path/kube.conf apply -f - <<EOF\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: headlamp-admin\n namespace: kube-system\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n name: headlamp-admin\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: cluster-admin\nsubjects:\n- kind: ServiceAccount\n name: headlamp-admin\n namespace: kube-system\n---\napiVersion: v1\nkind: Secret\ntype: kubernetes.io/service-account-token\nmetadata:\n name: headlamp-admin-token\n namespace: kube-system\n annotations:\n kubernetes.io/service-account.name: headlamp-admin\nEOF'" :rows="12" readonly /> |
| 96 | + <br><br> |
| 97 | + <p>{{ $t('label.token.for.dashboard.login') }}:</p> |
| 98 | + <code><b>kubectl --kubeconfig /custom/path/kube.conf describe secret headlamp-admin-token -n kube-system</b></code> |
| 99 | + </a-timeline-item> |
| 100 | + <a-timeline-item> |
| 101 | + <p> |
| 102 | + <strong>Create Access Token for Kubernetes Dashboard (legacy clusters)</strong> |
| 103 | + </p> |
| 104 | + <p v-html="$t('label.kubernetes.dashboard.create.token.desc')"></p> |
| 105 | + <a-textarea :value="'kubectl --kubeconfig /custom/path/kube.conf apply -f - <<EOF\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: kubernetes-dashboard-admin-user\n namespace: kubernetes-dashboard\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n name: kubernetes-dashboard-admin-user\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: cluster-admin\nsubjects:\n- kind: ServiceAccount\n name: kubernetes-dashboard-admin-user\n namespace: kubernetes-dashboard\n---\napiVersion: v1\nkind: Secret\ntype: kubernetes.io/service-account-token\nmetadata:\n name: kubernetes-dashboard-token\n namespace: kubernetes-dashboard\n annotations:\n kubernetes.io/service-account.name: kubernetes-dashboard-admin-user\nEOF'" :rows="12" readonly /> |
| 106 | + <br><br> |
| 107 | + <p>{{ $t('label.token.for.dashboard.login') }}:</p> |
| 108 | + <code><b>kubectl --kubeconfig /custom/path/kube.conf describe secret kubernetes-dashboard-token -n kubernetes-dashboard</b></code> |
86 | 109 | </a-timeline-item> |
87 | 110 | <a-timeline-item> |
88 | 111 | <p> |
89 | | - {{ $t('label.token.for.dashboard.login') }}<br><br> |
90 | | - <code><b>kubectl --kubeconfig /custom/path/kube.conf describe secret $(kubectl --kubeconfig /custom/path/kube.conf get secrets -n kube-system | grep headlamp-admin | awk '{print $1}') -n kube-system</b></code> |
| 112 | + <strong>Important Notes:</strong><br> |
| 113 | + • <strong>Port-forwarding is recommended for Headlamp</strong> - simpler and more reliable than kubectl proxy<br> |
| 114 | + • Token is only needed if accessing Headlamp via NodePort or LoadBalancer with external access<br> |
| 115 | + • For Kubernetes 1.24+, service account tokens are no longer auto-generated - use the Secret resource shown above or <code>kubectl create token</code> command<br> |
| 116 | + • <strong>Cluster-admin role grants full control</strong> - use with caution and only for trusted administrators<br> |
| 117 | + • Keep the port-forward command running while using the dashboard (press Ctrl+C to stop) |
91 | 118 | </p> |
92 | 119 | </a-timeline-item> |
93 | 120 | </a-timeline> |
94 | | - <p>{{ $t('label.more.access.dashboard.ui') }}, <a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui">https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui</a></p> |
| 121 | + <p>{{ $t('label.more.access.dashboard.ui') }}: |
| 122 | + <a href="https://headlamp.dev/docs/latest/">Headlamp Documentation</a> | |
| 123 | + <a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#accessing-the-dashboard-ui">Kubernetes Dashboard (Legacy)</a> |
| 124 | + </p> |
95 | 125 | </a-card> |
96 | 126 | <a-card :title="$t('label.access.kubernetes.nodes')"> |
97 | 127 | <p v-html="$t('label.kubernetes.access.details')"></p> |
|
0 commit comments