Kubernetes dashboard安装

1. To download Dashboard plugin deployment YAML file from internet.

#cd /home

#mkdir k8s

#cd k8s

# wget https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml

 ##官方链接https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/

 

2. To Create certificate for dashboard

# mkdir certs

# openssl req -nodes -newkey rsa:2048 -keyout certs/dashboard.key -out certs/dashboard.csr -subj "/C=/ST=/L=/O=/OU=/CN=kubernetes-dashboard"

# openssl x509 -req -sha256 -days 365 -in certs/dashboard.csr -signkey certs/dashboard.key -out certs/dashboard.crt

# kubectl create secret generic kubernetes-dashboard-certs --from-file=certs -n kube-system

3.To modify the default kubernetes-dashboard.yaml file, Modify the rbac parameter, and add type: NodePort to expose Dashboard service can be accessed by outside.

# vi kubernetes-dashboard.yaml

 

4.To create Dashboard

# kubectl create -f kubernetes-dashboard.yaml

5.To get NodePort and access token.

# kubectl -n kube-system get secret | grep kubernetes-dashboard

# kubectl describe -n kube-system secret/kubernetes-dashboard-token-xxxxx

# kubectl get svc -n kube-system  (Dashboard runs on port 32580)

6. To access the Dashboard (https://192.168.4.200:32580)

Note:

1)    If you login the dashboard , you find the dashboard show error like “User "system:anonymous" cannot get at the cluster scope.”,  
 
 

# vi /etc/kubernetes/manifests/kube-apiserver.yaml

添加如下参数:

--anonymous-auth=false

 

2)    Kube-apiserver down after installing the kubernetes dashboard?

Change or add bellow parameters.(bellow is for only one master lab environment)

- --insecure-bind-address=127.0.0.1

- --insecure-port=8080

livenessProbe:

failureThreshold: 8

httpGet:

host: 127.0.0.1

path: /healthz

port: 8080

scheme: HTTP

initialDelaySeconds: 15

timeoutSeconds: 15

原文地址:https://www.cnblogs.com/cnmumian/p/10659531.html

时间: 2024-10-18 19:37:43

Kubernetes dashboard安装的相关文章

kubernetes dashboard 安装

1.下载  dashboard.yaml文件 我安装的k8s版本为1.5.2,从github下载相近的dashaboard版本 wget https://raw.githubusercontent.com/kubernetes/dashboard/v1.5.0/src/deploy/kubernetes-dashboard.yaml 2.编辑kubernetes-dashboard.yaml 由于yaml文件中的image使用的是谷歌gcr.io,被墙无法下载,因此,需将文件中image 用do

Kubernetes Dashboard 安装与认证

1.安装dashboard $ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml(images地址记得改掉,因为墙,你懂得) 1.2, 配置ingress 映像域名xxx.dashboard.qing.cn(必须是https) 2 .创建admin token #cat dashboard-

K8s+dashboard安装部署 不错

系统安装使用虚拟机安装两个centos系统,在/etc/hosts里增加两行192.168.140.128 kuber-master192.168.140.129 kuber-node1 关闭防火墙systemctl stop firewalld & systemctl disable firewalld 关闭selinuxsed -i ‘s/enforcing/disabled/’ /etc/selinux/configsetenforce 0 关闭swapswapoff -a #临时关闭vi

安装kubernetes dashboard

一.kubernetes dashboard kubernetes dashboard是k8s的web管理界面 二.安装 k8s的版本为1.5 1.创建dashboard-controller.yaml [[email protected] dashboard]# cat dashboard-controller.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: # Keep the name in sync with

Kubernetes Dashboard的安装与配置

Kubernetes Dashboard的安装与配置 一 背景 通过kubeadm快速完成了kubernetes的安装,即可迅速地体验到kubernetes的强大功能.美中不足的是,只能通过命令来查看或操作,没有一个直观且简洁的Web UI来感受一下这种成功的喜悦.此外,国内的网络环境,也在某种程度上增加了一些门槛.面对如此种种,依然有办法体验kunernetes dashboard. 二 操作步骤 因为不清楚Pod会被调度到哪一个Node上,所以在每一个节点上执行以下脚本: #!/bin/ba

[k8s]kubernetes dashboard的安装

之前一直使用的是命令行,但是又觉得如果连控制台都还没有动手实践过会不会有点low 1.安装dashboard 参阅官网的安装方法,https://github.com/kubernetes/dashboard,安装很简单,如果慢可以使用其它的镜像网站,我这里使用的是mirrorgooglecontainers/kubernetes-dashboard-amd64,然后重新打了k8s.gcr.io/kubernetes-dashboard-amd64的tag 2.暴露服务 [email prote

Kubernetes Dashboard的安装与坑

1.前言 https://github.com/kubernetes/dashboard/releases kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml Kubernetes Dashboard is a general purpose, web-based UI for Kuberne

利用kubernetes 安装 Kubernetes Dashboard

最近再次学习下k8s,版本已经升级到1.17了,准备部署一下,以下是官方地址 https://github.com/kubernetes/dashboard 接着往下面看 kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc2/aio/deploy/recommended.yaml [[email protected] ~]# kubectl get pods --all-namespa

Kubernetes Dashboard - 每天5分钟玩转 Docker 容器技术(173)

前面章节 Kubernetes 所有的操作我们都是通过命令行工具 kubectl 完成的.为了提供更丰富的用户体验,Kubernetes 还开发了一个基于 Web 的 Dashboard,用户可以用 Kubernetes Dashboard 部署容器化的应用.监控应用的状态.执行故障排查任务以及管理 Kubernetes 各种资源. 在 Kubernetes Dashboard 中可以查看集群中应用的运行状态,也能够创建和修改各种 Kubernetes 资源,比如 Deployment.Job.