MicroK8s : डैशबोर्ड सक्षम करें2023/09/04 |
MicroK8s क्लस्टर पर डैशबोर्ड को सक्षम करने के लिए, निम्नानुसार कॉन्फ़िगर करें।
|
[1] | प्राथमिक नोड पर डैशबोर्ड ऐड-ऑन सक्षम करें। |
root@dlp:~# microk8s enable dashboard dns Infer repository core for addon dashboard Infer repository core for addon dns Enabling Kubernetes Dashboard Infer repository core for addon metrics-server Enabling Metrics-Server serviceaccount/metrics-server created clusterrole.rbac.authorization.k8s.io/system:aggregated-metrics-reader created clusterrole.rbac.authorization.k8s.io/system:metrics-server created rolebinding.rbac.authorization.k8s.io/metrics-server-auth-reader created clusterrolebinding.rbac.authorization.k8s.io/metrics-server:system:auth-delegator created clusterrolebinding.rbac.authorization.k8s.io/system:metrics-server created service/metrics-server created deployment.apps/metrics-server created apiservice.apiregistration.k8s.io/v1beta1.metrics.k8s.io created clusterrolebinding.rbac.authorization.k8s.io/microk8s-admin created Adding argument --authentication-token-webhook to nodes. Configuring node 10.0.0.51 Restarting nodes. Configuring node 10.0.0.51 Metrics-Server is enabled Applying manifest serviceaccount/kubernetes-dashboard created service/kubernetes-dashboard created secret/kubernetes-dashboard-certs created secret/kubernetes-dashboard-csrf created secret/kubernetes-dashboard-key-holder created configmap/kubernetes-dashboard-settings created role.rbac.authorization.k8s.io/kubernetes-dashboard created clusterrole.rbac.authorization.k8s.io/kubernetes-dashboard created rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created clusterrolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created deployment.apps/kubernetes-dashboard created service/dashboard-metrics-scraper created deployment.apps/dashboard-metrics-scraper created If RBAC is not enabled access the dashboard by creating a default token with: microk8s kubectl create token -n kube-system default --duration=8544h Use this token in the https login UI of the kubernetes-dashboard service. In an RBAC enabled setup (microk8s enable RBAC) you need to create a user with restricted permissions as shown in: https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md Enabling DNS Applying manifest serviceaccount/coredns created configmap/coredns created deployment.apps/coredns created service/kube-dns created clusterrole.rbac.authorization.k8s.io/coredns created clusterrolebinding.rbac.authorization.k8s.io/coredns created Restarting kubelet Adding argument --cluster-domain to nodes. Configuring node 10.0.0.51 Adding argument --cluster-dns to nodes. Configuring node 10.0.0.51 Restarting nodes. Configuring node 10.0.0.51 DNS is enabledroot@dlp:~# microk8s kubectl get services -n kube-system NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE metrics-server ClusterIP 10.152.183.247 <none> 443/TCP 64s kubernetes-dashboard ClusterIP 10.152.183.137 <none> 443/TCP 56s dashboard-metrics-scraper ClusterIP 10.152.183.89 <none> 8000/TCP 56s kube-dns ClusterIP 10.152.183.10 <none> 53/UDP,53/TCP,9153/TCP 55s # सुरक्षा टोकन की पुष्टि करें root@dlp:~# microk8s config | grep token token: MUV6TU54VXlQR2JJRDFadU9lNXlQbHlpaVhEQ1o4MXNhRjQreVEvakNRRT0K # यदि आपको आवश्यकता हो तो बाहरी पहुंच सक्षम करने के लिए पोर्ट-फ़ॉरवर्डिंग सेट करें root@dlp:~# microk8s kubectl port-forward -n kube-system service/kubernetes-dashboard --address 0.0.0.0 10443:443 Forwarding from 0.0.0.0:10443 -> 8443 |
[2] | स्थानीय नेटवर्क में किसी भी क्लाइंट कंप्यूटर पर वेब ब्राउज़र के साथ [https://(MicroK8s प्राथमिक नोड का होस्टनाम या आईपी पता):10443/] तक पहुंच। आपके द्वारा पुष्टि किए गए सुरक्षा टोकन को [1] पर [Enter token] अनुभाग में कॉपी और पेस्ट करें और [Sing In] बटन पर क्लिक करें। |
![]() |
[3] | प्रमाणीकरण सफलतापूर्वक पारित होने के बाद, MicroK8s क्लस्टर डैशबोर्ड प्रदर्शित होता है। |
![]() |
![]() |
Sponsored Link |