{"id":1884,"date":"2023-03-30T23:01:00","date_gmt":"2023-03-30T15:01:00","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1884"},"modified":"2023-04-22T09:00:47","modified_gmt":"2023-04-22T01:00:47","slug":"better-management-tool-than-kubernetes-dashboard-kuboard","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/30\/better-management-tool-than-kubernetes-dashboard-kuboard\/","title":{"rendered":"\u6bd4 Kubernetes Dashboard \u66f4\u597d\u7528\u7684\u7ba1\u7406\u5de5\u5177 &#8211; Kuboard"},"content":{"rendered":"<h2>Kuboard \u4ecb\u7ecd<\/h2>\n<p>Kuboard \u662f\u4e00\u6b3e\u514d\u8d39\u7684 Kubernetes \u7ba1\u7406\u5de5\u5177\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u7ed3\u5408\u4ee3\u7801\u4ed3\u5e93\u3001\u955c\u50cf\u4ed3\u5e93\u3001CI\/CD\u5de5\u5177\u7b49\uff0c\u53ef\u4ee5\u4fbf\u6377\u7684\u642d\u5efa\u4e00\u4e2a\u751f\u4ea7\u53ef\u7528\u7684 Kubernetes \u5bb9\u5668\u4e91\u5e73\u53f0\uff0c\u8f7b\u677e\u7ba1\u7406\u548c\u8fd0\u884c\u4e91\u539f\u751f\u5e94\u7528\u3002Kuboard \u63d0\u4f9b\u7684\u529f\u80fd\u6709\uff1a<\/p>\n<p>\u53c2\u8003\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/kuboard.cn\/guide-v2\/introduction.html\">https:\/\/kuboard.cn\/guide-v2\/introduction.html<\/a><br \/>\n\u5b98\u7f51\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/www.kuboard.cn\/\">https:\/\/www.kuboard.cn\/<\/a><\/p>\n<p><!-- more --><\/p>\n<h3>Kubernetes \u57fa\u672c\u7ba1\u7406\u529f\u80fd<\/h3>\n<ul>\n<li>\u8282\u70b9\u7ba1\u7406<\/li>\n<li>\u540d\u79f0\u7a7a\u95f4\u7ba1\u7406<\/li>\n<li>\u5b58\u50a8\u7c7b\/\u5b58\u50a8\u5377\u7ba1\u7406<\/li>\n<li>\u63a7\u5236\u5668\uff08Deployment\/StatefulSet\/DaemonSet\/CronJob\/Job\/ReplicaSet\uff09\u7ba1\u7406<\/li>\n<li>Service\/Ingress \u7ba1\u7406<\/li>\n<li>ConfigMap\/Secret \u7ba1\u7406<\/li>\n<li>CustomerResourceDefinition \u7ba1\u7406<\/li>\n<\/ul>\n<h3>Kubernetes \u95ee\u9898\u8bca\u65ad<\/h3>\n<ul>\n<li>Top Nodes \/ Top Pods<\/li>\n<li>\u4e8b\u4ef6\u5217\u8868\u53ca\u901a\u77e5<\/li>\n<li>\u5bb9\u5668\u65e5\u5fd7\u53ca\u7ec8\u7aef<\/li>\n<li>KuboardProxy (kubectl proxy \u7684\u5728\u7ebf\u7248\u672c)<\/li>\n<li>PortForward (kubectl port-forward \u7684\u5feb\u6377\u7248\u672c)<\/li>\n<li>\u590d\u5236\u6587\u4ef6 \uff08kubectl cp \u7684\u5728\u7ebf\u7248\u672c\uff09<\/li>\n<\/ul>\n<h3>\u8ba4\u8bc1\u4e0e\u6388\u6743<\/h3>\n<ul>\n<li>Github\/GitLab \u5355\u70b9\u767b\u5f55<\/li>\n<li>KeyCloak \u8ba4\u8bc1<\/li>\n<li>LDAP \u8ba4\u8bc1<\/li>\n<li>\u5b8c\u6574\u7684 RBAC \u6743\u9650\u7ba1\u7406<\/li>\n<\/ul>\n<h3>Kuboard \u7279\u8272\u529f\u80fd<\/h3>\n<ul>\n<li>Kuboard \u5b98\u65b9\u5957\u4ef6<\/li>\n<li>\n<ul>\n<li>Grafana+Prometheus \u8d44\u6e90\u76d1\u63a7<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>Grafana+Loki+Promtail \u65e5\u5fd7\u805a\u5408<\/li>\n<\/ul>\n<\/li>\n<li>Kuboard \u81ea\u5b9a\u4e49\u540d\u79f0\u7a7a\u95f4\u5e03\u5c40<\/li>\n<li>Kuboard \u4e2d\u82f1\u6587\u8bed\u8a00\u5305<\/li>\n<\/ul>\n<h3>Kuboard \u9884\u89c8<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/kuboard.cn\/images\/preview.png\" alt=\"Kuboard\u9884\u89c8\" \/><\/p>\n<h2>\u5b89\u88c5\u524d\u63d0<\/h2>\n<p>Kuboard \u53ea\u4f9d\u8d56\u4e8e Kubernetes API\uff0c\u53ef\u4ee5\u5728\u591a\u79cd\u60c5\u51b5\u4e0b\u4f7f\u7528 Kuboard\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528 kubeadm \u5b89\u88c5\u7684 Kubernetes \u96c6\u7fa4<\/li>\n<li>\u4f7f\u7528\u4e8c\u8fdb\u5236\u65b9\u5f0f\u5b89\u88c5\u7684 Kubernetes \u96c6\u7fa4<\/li>\n<li>\u963f\u91cc\u4e91\/\u817e\u8baf\u4e91\u7b49\u4e91\u4f9b\u5e94\u5546\u6258\u7ba1\u7684 Kubernetes \u96c6\u7fa4<\/li>\n<\/ul>\n<p>Kuboard \u5bf9 Kubernetes \u7684\u7248\u672c\u517c\u5bb9\u6027\uff0c\u53c2\u8003\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/kuboard.cn\/guide-v2\/introduction.html#\u5b89\u88c5\u524d\u63d0\">https:\/\/kuboard.cn\/guide-v2\/introduction.html#\u5b89\u88c5\u524d\u63d0<\/a><\/p>\n<h2>\u5b89\u88c5<\/h2>\n<h3>\u5b89\u88c5 Kuboard<\/h3>\n<pre><code class=\"language-bash\">kubectl apply -f https:\/\/kuboard.cn\/install-script\/kuboard.yaml\nkubectl apply -f https:\/\/addons.kuboard.cn\/metrics-server\/0.3.6\/metrics-server.yaml<\/code><\/pre>\n<h3>\u5378\u8f7d Kuboard<\/h3>\n<pre><code class=\"language-bash\">kubectl delete -f https:\/\/kuboard.cn\/install-script\/kuboard.yaml\nkubectl delete -f https:\/\/addons.kuboard.cn\/metrics-server\/0.3.6\/metrics-server.yaml<\/code><\/pre>\n<h3>\u83b7\u53d6 Token<\/h3>\n<p>\u53ef\u4ee5\u83b7\u5f97\u7ba1\u7406\u5458\u7528\u6237\u3001\u53ea\u8bfb\u7528\u6237\u7684Token<\/p>\n<h4>\u7ba1\u7406\u5458\u7528\u6237<\/h4>\n<p><strong>\u62e5\u6709\u7684\u6743\u9650<\/strong><\/p>\n<p>\u6b64Token\u62e5\u6709 ClusterAdmin \u7684\u6743\u9650\uff0c\u53ef\u4ee5\u6267\u884c\u6240\u6709\u64cd\u4f5c<\/p>\n<p><strong>\u6267\u884c\u547d\u4ee4<\/strong><\/p>\n<pre><code class=\"language-bash\">echo $(kubectl -n kube-system get secret $(kubectl -n kube-system get secret | grep kuboard-user | awk &#039;{print $1}&#039;) -o go-template=&#039;{{.data.token}}&#039; | base64 -d)<\/code><\/pre>\n<p><strong>\u8f93\u51fa<\/strong><\/p>\n<p>\u53d6\u8f93\u51fa\u4fe1\u606f\u4e2d token \u5b57\u6bb5<\/p>\n<pre><code class=\"language-bash\">eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJhZG1pbi11c2VyLXRva2VuLWc4aHhiIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImFkbWluLXVzZXIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiI5NDhiYjVlNi04Y2RjLTExZTktYjY3ZS1mYTE2M2U1ZjdhMGYiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZS1zeXN0ZW06YWRtaW4tdXNlciJ9.DZ6dMTr8GExo5IH_vCWdB_MDfQaNognjfZKl0E5VW8vUFMVvALwo0BS-6Qsqpfxrlz87oE9yGVCpBYV0D00811bLhHIg-IR_MiBneadcqdQ_TGm_a0Pz0RbIzqJlRPiyMSxk1eXhmayfPn01upPdVCQj6D3vAY77dpcGplu3p5wE6vsNWAvrQ2d_V1KhR03IB1jJZkYwrI8FHCq_5YuzkPfHsgZ9MBQgH-jqqNXs6r8aoUZIbLsYcMHkin2vzRsMy_tjMCI9yXGiOqI-E5efTb-_KbDVwV5cbdqEIegdtYZ2J3mlrFQlmPGYTwFI8Ba9LleSYbCi4o0k74568KcN_w<\/code><\/pre>\n<h2>\u8bbf\u95ee Kuboard<\/h2>\n<p>\u53ef\u4ee5\u901a\u8fc7NodePort\u3001port-forward \u4e24\u79cd\u65b9\u5f0f\u5f53\u4e2d\u7684\u4efb\u610f\u4e00\u79cd\u8bbf\u95ee Kuboard<\/p>\n<h3>\u901a\u8fc7NodePort\u8bbf\u95ee<\/h3>\n<p>Kuboard Service \u4f7f\u7528\u4e86 NodePort \u7684\u65b9\u5f0f\u66b4\u9732\u670d\u52a1\uff0cNodePort \u4e3a 32567\uff0c\u53ef\u4ee5\u6309\u5982\u4e0b\u65b9\u5f0f\u8bbf\u95ee Kuboard<\/p>\n<pre><code>http:\/\/\u4efb\u610f\u4e00\u4e2aWorker\u8282\u70b9\u7684IP\u5730\u5740:32567\/<\/code><\/pre>\n<p>\u8f93\u5165\u524d\u4e00\u6b65\u9aa4\u4e2d\u83b7\u5f97\u7684 token\uff0c\u53ef\u8fdb\u5165 Kubernetes \u96c6\u7fa4\u6982\u89c8<\/p>\n<h3>\u8fdb\u4e00\u6b65\u4f7f\u7528<\/h3>\n<p>\u6559\u7a0b\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/www.kuboard.cn\/learning\/\">https:\/\/www.kuboard.cn\/learning\/<\/a><br \/>\nKubernetes \u5165\u95e8\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/www.kuboard.cn\/learning\/#kubernetes-\u5165\u95e8\">https:\/\/www.kuboard.cn\/learning\/#kubernetes-\u5165\u95e8<\/a><br \/>\n\u4f7f\u7528\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/www.kuboard.cn\/guide\/\">https:\/\/www.kuboard.cn\/guide\/<\/a><\/p>\n<ul>\n<li>\u5229\u7528 Kuboard \u7ba1\u7406 Kubernetes \u96c6\u7fa4<\/li>\n<li>\u6388\u6743\u7528\u6237\u8bbf\u95ee\u6307\u5b9a\u7684\u540d\u79f0\u7a7a\u95f4<\/li>\n<li>\u8ba9\u591a\u4e2a\u56e2\u961f\u534f\u4f5c\u4f7f\u7528 Kuboard \u7ba1\u7406 Kubernetes \u96c6\u7fa4<\/li>\n<li>\u5c06 Kuboard\/Kubernetes \u4e0e CI\/CD \u5de5\u5177\u6574\u5408<\/li>\n<li>\u5229\u7528 Kuboard \u8fdb\u884c Kubernetes \u5e94\u7528\u7a0b\u5e8f\u7684\u95ee\u9898\u8bca\u65ad<\/li>\n<li>\u4f7f\u7528 Kuboard \u76d1\u63a7\u5957\u4ef6\u76d1\u63a7 Kubernetes \u96c6\u7fa4<\/li>\n<li>\u4f7f\u7528 Kuboard \u65e5\u5fd7\u805a\u5408\u5957\u4ef6\u67e5\u770b\u5e94\u7528\u7684\u65e5\u5fd7<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Kuboard \u4ecb\u7ecd Kuboard \u662f\u4e00\u6b3e\u514d\u8d39\u7684 Kubernetes \u7ba1\u7406\u5de5\u5177\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u7ed3\u5408\u4ee3\u7801 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[483],"class_list":["post-1884","post","type-post","status-publish","format-standard","hentry","category-k8s","tag-kuboard"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1884"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1884\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}