- Kubernetes 教程
- Kubernetes - 首页
- Kubernetes - 概述
- Kubernetes - 架构
- Kubernetes - 设置
- Kubernetes - 镜像
- Kubernetes - 作业
- Kubernetes - 标签和选择器
- Kubernetes - 命名空间
- Kubernetes - 节点
- Kubernetes - 服务
- Kubernetes - Pod
- Kubernetes - 副本控制器
- Kubernetes - 副本集
- Kubernetes - 部署
- Kubernetes - 卷
- Kubernetes - 密钥
- Kubernetes - 网络策略
- 高级 Kubernetes
- Kubernetes - API
- Kubernetes - Kubectl
- Kubernetes - Kubectl 命令
- Kubernetes - 创建应用程序
- Kubernetes - 应用程序部署
- Kubernetes - 自动缩放
- Kubernetes - 仪表盘设置
- Kubernetes - 监视
- Kubernetes 实用资源
- Kubernetes - 快速指南
- Kubernetes - 实用资源
- Kubernetes - 讨论
Kubernetes - 仪表盘设置
设置 Kubernetes 仪表盘涉及几个步骤,并需要一套工具作为先决条件来进行设置。
- Docker(1.3+)
- go(1.5+)
- nodejs(4.2.2+)
- npm(1.3+)
- java(7+)
- gulp(3.9+)
- Kubernetes(1.1.2+)
设置仪表盘
$ sudo apt-get update && sudo apt-get upgrade Installing Python $ sudo apt-get install python $ sudo apt-get install python3 Installing GCC $ sudo apt-get install gcc-4.8 g++-4.8 Installing make $ sudo apt-get install make Installing Java $ sudo apt-get install openjdk-7-jdk Installing Node.js $ wget https://node.org.cn/dist/v4.2.2/node-v4.2.2.tar.gz $ tar -xzf node-v4.2.2.tar.gz $ cd node-v4.2.2 $ ./configure $ make $ sudo make install Installing gulp $ npm install -g gulp $ npm install gulp
验证版本
Java Version $ java –version java version "1.7.0_91" OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-1~deb8u1+rpi1) OpenJDK Zero VM (build 24.91-b01, mixed mode) $ node –v V4.2.2 $ npn -v 2.14.7 $ gulp -v [09:51:28] CLI version 3.9.0 $ sudo gcc --version gcc (Raspbian 4.8.4-1) 4.8.4 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
安装 GO
$ git clone https://go.googlesource.com/go $ cd go $ git checkout go1.4.3 $ cd src Building GO $ ./all.bash $ vi /root/.bashrc In the .bashrc export GOROOT = $HOME/go export PATH = $PATH:$GOROOT/bin $ go version go version go1.4.3 linux/arm
安装 Kubernetes 仪表盘
$ git clone https://github.com/kubernetes/dashboard.git $ cd dashboard $ npm install -g bower
运行仪表盘
$ git clone https://github.com/kubernetes/dashboard.git $ cd dashboard $ npm install -g bower $ gulp serve [11:19:12] Requiring external module babel-core/register [11:20:50] Using gulpfile ~/dashboard/gulpfile.babel.js [11:20:50] Starting 'package-backend-source'... [11:20:50] Starting 'kill-backend'... [11:20:50] Finished 'kill-backend' after 1.39 ms [11:20:50] Starting 'scripts'... [11:20:53] Starting 'styles'... [11:21:41] Finished 'scripts' after 50 s [11:21:42] Finished 'package-backend-source' after 52 s [11:21:42] Starting 'backend'... [11:21:43] Finished 'styles' after 49 s [11:21:43] Starting 'index'... [11:21:44] Finished 'index' after 1.43 s [11:21:44] Starting 'watch'... [11:21:45] Finished 'watch' after 1.41 s [11:23:27] Finished 'backend' after 1.73 min [11:23:27] Starting 'spawn-backend'... [11:23:27] Finished 'spawn-backend' after 88 ms [11:23:27] Starting 'serve'... 2016/02/01 11:23:27 Starting HTTP server on port 9091 2016/02/01 11:23:27 Creating API client for 2016/02/01 11:23:27 Creating Heapster REST client for https://127.0.0.1:8082 [11:23:27] Finished 'serve' after 312 ms [BS] [BrowserSync SPA] Running... [BS] Access URLs: -------------------------------------- Local: https://127.0.0.1:9090/ External: http://192.168.1.21:9090/ -------------------------------------- UI: https://127.0.0.1:3001 UI External: http://192.168.1.21:3001 -------------------------------------- [BS] Serving files from: /root/dashboard/.tmp/serve [BS] Serving files from: /root/dashboard/src/app/frontend [BS] Serving files from: /root/dashboard/src/app
Kubernetes 仪表盘
广告