docker mirror

This commit is contained in:
huanqing.shao
2020-02-10 21:22:10 +08:00
parent cf6113d693
commit 5549eea232
12 changed files with 221 additions and 77 deletions

View File

@ -47,14 +47,14 @@ module.exports = [
url: 'https://kubetrain.cn/?from=kuboard-ads',
weight: 60
},
{
name: '12元直播课',
description: 'Kubernetes集群安装详解安装脚本定制',
strong: '入门起点',
action: '捧个场',
url: 'https://ke.qq.com/course/477593?flowToken=1016937',
weight: 60
}
// {
// name: '12元直播课',
// description: 'Kubernetes集群安装详解安装脚本定制',
// strong: '入门起点',
// action: '捧个场',
// url: 'https://ke.qq.com/course/477593?flowToken=1016937',
// weight: 60
// }
// {
// name: '宝塔面板',

View File

@ -38,6 +38,7 @@ module.exports = {
'install-kubernetes',
'sealos/',
'install-node-port-range',
'docker-mirror',
'k8s-restart',
]
},

View File

@ -4,7 +4,7 @@
</div>
<div v-show="!$isSharing && !$frontmatter.lessAds" class="page-nav" style="max-width: 1000px; margin: auto;">
<div class="tip custom-block row" style="padding: 1rem; margin-top: 0;">
<div style="display: inline-block; vertical-align: top; line-height: 1.6rem;" class="col-md-10">
<div style="display: inline-block; vertical-align: top; line-height: 1.6rem;" class="col-md-8">
<li>
<span style="color: red; font-weight: 500;">免费</span>
Kubernetes教程K8S教程绝不降低品质
@ -23,10 +23,13 @@
</span> -->
</li>
</div>
<div class="col-md-2">
<a href="https://ke.qq.com/course/477593?flowToken=1017366" target="_blank">
<div class="col-md-4">
<span style="font-size: 18px; font-weight: 600;">Kuboard</span>
<br/>
<span style="font-size: 14px; color: #666;">- 快速在 Kubernetes 落地微服务</span>
<!-- <a href="https://ke.qq.com/course/477593?flowToken=1017366" target="_blank">
<FancyImage src="/images/courses/kubeadm.png" title="K8S高薪培训" description="360讲师授课" alt="K8S培训_高薪培训" type="Rectangle"/>
</a>
</a> -->
</div>
</div>
</div>

View File

@ -1,38 +1,48 @@
version: "3"
services:
web:
# replace username/repo:tag with your name and image details
image: eipwork/kuboard-press:latest
deploy:
replicas: 1
resources:
limits:
cpus: "0.1"
memory: 500M
restart_policy:
condition: on-failure
kuboard:
image: eipwork/kuboard:lua
ports:
- "8081:80"
- "8083:80"
volumes:
- ./docs:/usr/share/nginx/html
networks:
- webnet
kubetrain:
# replace username/repo:tag with your name and image details
image: eipwork/kuboard-press:latest
deploy:
replicas: 1
resources:
limits:
cpus: "0.1"
memory: 500M
restart_policy:
condition: on-failure
ports:
- "8082:80"
volumes:
- /Users/shaohuanqing/Kuboard/kuboard-workspace/kubetrain/root:/usr/share/nginx/html
- /Users/shaohuanqing/Kuboard/kuboard-workspace/nginx-lua/docker/nginx.80.conf:/etc/nginx/conf.d/nginx.80.conf
- /Users/shaohuanqing/Kuboard/kuboard-workspace/kuboard-press/docs:/usr/share/nginx/html
- /Users/shaohuanqing/Kuboard/kuboard-workspace/nginx-lua/docker/nginx-jwt.lua:/usr/local/openresty/nginx/jwt-lua/resty/nginx-jwt.lua
networks:
- webnet
# web:
# # replace username/repo:tag with your name and image details
# image: eipwork/kuboard-press:latest
# deploy:
# replicas: 1
# resources:
# limits:
# cpus: "0.1"
# memory: 500M
# restart_policy:
# condition: on-failure
# ports:
# - "8081:80"
# volumes:
# - ./docs:/usr/share/nginx/html
# networks:
# - webnet
# kubetrain:
# # replace username/repo:tag with your name and image details
# image: eipwork/kuboard-press:latest
# deploy:
# replicas: 1
# resources:
# limits:
# cpus: "0.1"
# memory: 500M
# restart_policy:
# condition: on-failure
# ports:
# - "8082:80"
# volumes:
# - /Users/shaohuanqing/Kuboard/kuboard-workspace/kubetrain/root:/usr/share/nginx/html
# networks:
# - webnet
networks:
webnet:

84
install/docker-mirror.md Normal file
View File

@ -0,0 +1,84 @@
---
vssueId: 115
description: 修改 docker 镜像仓库地址,加快 docker 镜像的下载速度
meta:
- name: keywords
content: docker镜像加速
---
# Docker镜像加速
* docker 中,只能够为 docker 官方镜像仓库 hub.docker.com 提供 mirror 加速,自建的 docker 镜像仓库是不能配置 mirror 加速的;
* 如果您参考 kuboard.cn 提供的 kubernetes 安装文档,默认使用的 docker mirror 是 https://registry.cn-hangzhou.aliyuncs.com 。
## 修改镜像仓库 mirror 地址
本文提供了快速修改的方式和手工修改的方式,效果相同
<b-tabs content-class="mt-3">
<b-tab title="快速修改" active>
* 下面提供了四个 mirror 地址,您可以去掉其中任意一个地址的注释,以使用该 mirror 地址。
``` sh
# Docker中国 mirror
# export REGISTRY_MIRROR="https://registry.docker-cn.com"
# 腾讯云 docker hub mirror
# export REGISTRY_MIRROR="https://mirror.ccs.tencentyun.com"
# DaoCloud 镜像
# export REGISTRY_MIRROR="http://f1361db2.m.daocloud.io"
# 阿里云 docker hub mirror
export REGISTRY_MIRROR=https://registry.cn-hangzhou.aliyuncs.com
curl -sSL https://kuboard.cn/install-script/set_mirror.sh | sh -s ${REGISTRY_MIRROR}
systemctl daemon-reload
systemctl restart docker
systemctl start kubelet # 假设您安装了 kubenetes
```
</b-tab>
<b-tab title="手工修改">
* 修改 /etc/docker/daemon.json 文件(如果没有,则创建):
``` sh
vim /etc/docker/daemon.json
```
* 添加 registry-mirrors 字段:
``` json
{
"registry-mirrors": ["https://registry.cn-hangzhou.aliyuncs.com"]
}
```
* 重启 docker/kubelet
```sh
systemctl daemon-reload
systemctl restart docker
systemctl start kubelet # 假设您安装了 kubenetes
```
</b-tab>
</b-tabs>
## 查看修改结果
* 执行命令
``` sh
docker info
```
* 查看结果
``` log {12}
...
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
https://registry.cn-hangzhou.aliyuncs.com
Live Restore Enabled: false
Product License: Community Engine
```

View File

@ -35,13 +35,13 @@ Kuboard 是 Kubernetes 的一款图形化管理界面。
| Kubernetes 版本 | Kuboard 版本 | 兼容性 | 说明 |
| --------------- | -------------- | ------ | ------------------------------------------------------------ |
| v1.17 | v1.0 | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.16 | v1.0 | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.15 | v1.0 | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.14 | v1.0 | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.13 | v1.0 | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.12 | v1.0 | <span style="font-size: 24px;">😐</span> | Kubernetes Api v1.12 不支持 dryRun<br />忽略Kuboard在执行命令时的参数校验错误,可正常工作 |
| v1.11 | v1.0 | <span style="font-size: 24px;">😐</span> | 同上 |
| v1.17 | v1.0.x | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.16 | v1.0.x | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.15 | v1.0.x | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.14 | v1.0.x | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.13 | v1.0.x | <span style="font-size: 24px;">😄</span> | 已验证 |
| v1.12 | v1.0.x | <span style="font-size: 24px;">😐</span> | Kubernetes Api v1.12 不支持 dryRun<br />Kuboard 不支持 Kubernetes v1.12 |
| v1.11 | v1.0.x | <span style="font-size: 24px;">😐</span> | Kuboard 不支持 Kubernetes v1.11 |
## 安装
@ -92,6 +92,7 @@ kuboard-54c9c4f6cb-6lf88 1/1 Running 0 45s
``` sh
kubectl delete -f https://kuboard.cn/install-script/kuboard.yaml
kubectl delete -f https://addons.kuboard.cn/metrics-server/0.3.6/metrics-server.yaml
```
</b-tab>
@ -215,7 +216,7 @@ kubectl port-forward service/kuboard 8080:80 -n kube-system
如需要无登录访问集群概览页面,可使用如下格式的 url 进入:
```
http://任意一个Worker节点的IP地址:32567/#/dashboard?k8sToken=yourtoken
http://任意一个Worker节点的IP地址:32567/dashboard?k8sToken=yourtoken
```
::: tip 其他界面
@ -226,7 +227,7 @@ http://任意一个Worker节点的IP地址:32567/#/dashboard?k8sToken=yourtoken
如果想要无登录直接访问容器组的控制台,可使用如下格式的 url 进入:
```
http://任意一个Worker节点的IP地址:32567/#/console/yournamespace/yourpod?containerName=yourcontainer&shell=bash&k8sToken=yourtoken
http://任意一个Worker节点的IP地址:32567/console/yournamespace/yourpod?containerName=yourcontainer&shell=bash&k8sToken=yourtoken
```
其中shell 参数可选取值有:

View File

@ -1,12 +1,12 @@
---
vssueId: 92
description: Kubernete升级_使用kubeadm升级K8S集群到v1.15.5
description: Kubernete升级_使用kubeadm升级K8S集群到v1.15.7
meta:
- name: keywords
content: Kubernetes升级,K8S升级,升级Kuberentes1.15.5
content: Kubernetes升级,K8S升级,升级Kuberentes1.15.7
---
# K8S从1.15.x升级到 1.15.5
# K8S从1.15.x升级到 1.15.7
<AdSenseTitle/>
@ -16,10 +16,10 @@ meta:
## 前提条件
* 您使用 kubeadm 安装了 kubernetes v1.15.0 / v1.15.1 / v1.15.2 / v1.15.3 / v1.15.4 集群
* 您想要将其升级到最新的版本 kubernetes v1.15.5
* 您想要将其升级到最新的版本 kubernetes v1.15.7
::: tip
www.kuboard.cn 是一款免费的基于 Kubernetes 的微服务管理界面,目前只能提供 kubernetes v1.15.0 / v1.15.1 / v1.15.2 / v1.15.3 到 kubernetes v1.15.5 的升级文档,其他版本的集群,请参考 kubernetes 官网文档 [kubeadm upgrade](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/)
www.kuboard.cn 是一款免费的基于 Kubernetes 的微服务管理界面,目前只能提供 kubernetes v1.15.0 / v1.15.1 / v1.15.2 / v1.15.3 到 kubernetes v1.15.7 的升级文档,其他版本的集群,请参考 kubernetes 官网文档 [kubeadm upgrade](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/)
:::
## 升级 kubeadm/kubelet/kubectl
@ -28,7 +28,7 @@ www.kuboard.cn 是一款免费的基于 Kubernetes 的微服务管理界面,
``` sh
# 在所有节点执行(包括 master 和 worker 节点)
yum install -y kubelet-1.15.5 kubeadm-1.15.5 kubectl-1.15.5
yum install -y kubelet-1.15.7 kubeadm-1.15.7 kubectl-1.15.7
systemctl daemon-reload
systemctl restart kubelet
```
@ -74,7 +74,7 @@ scheduler: {}
文件内容如下所示,根据前面 `kubeadm config view` 的执行结果,修改了如下字段:
* imageRepository 的值修改为registry.cn-hangzhou.aliyuncs.com/google_containers
* kubernetesVersion 的值修改为: v1.15.5
* kubernetesVersion 的值修改为: v1.15.7
``` yaml {15,17}
apiServer:
extraArgs:
@ -92,7 +92,7 @@ etcd:
dataDir: /var/lib/etcd
imageRepository: registry.cn-hangzhou.aliyuncs.com/google_containers
kind: ClusterConfiguration
kubernetesVersion: v1.15.5
kubernetesVersion: v1.15.7
networking:
dnsDomain: cluster.local
serviceSubnet: 10.96.0.0/12

View File

@ -15,17 +15,19 @@ meta:
首先,确保您已经 [安装了 Kuboard](/install/install-dashboard-upgrade.html) <Badge>Kuboard v1.0.6-beta.3</Badge>,并且使用 [管理员用户](/install/install-dashboard.html#获取token)) 登录Kuboard
首先,确保您已经 [安装了 Kuboard](/install/install-dashboard-upgrade.html) <Badge>Kuboard v1.0.6</Badge>,并且使用 [管理员用户](/install/install-dashboard.html#获取token)) 登录Kuboard
## 为名称空间创建管理员用户
::: tip 用户名密码?
* 当前只支持 [ServiceAccount](/learning/k8s-advanced/sec/sa-admin.html#user-accounts-vs-service-accounts)
* 用户名密码OpenID Connect的登录方式将在2020年2月提供
* 本文档以 [ServiceAccount](/learning/k8s-advanced/sec/sa-admin.html#user-accounts-vs-service-accounts) 为例
* 用户名密码OpenID Connect的登录方式请参考 [使用 GitHub/GitLab 账号登录 Kubernetes](/learning/k8s-advanced/sec/authenticate/install.html)
:::
<Course courseId="484058" />
按照下面的步骤,可以快速为 Kubernetes 中的某个名称空间创建管理用户
* 进入 Kuboard 名称空间页面,如下图所示:

13
package-lock.json generated
View File

@ -1155,18 +1155,17 @@
}
},
"@vuepress/plugin-active-header-links": {
"version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/@vuepress/plugin-active-header-links/download/@vuepress/plugin-active-header-links-1.2.0.tgz",
"integrity": "sha1-RklcieUaleVxOb4Aff+8rksikmA=",
"version": "1.3.0",
"resolved": "https://registry.npm.taobao.org/@vuepress/plugin-active-header-links/download/@vuepress/plugin-active-header-links-1.3.0.tgz",
"integrity": "sha1-i0GE58hKXudU5rTzSZfDvXrge3I=",
"requires": {
"lodash.debounce": "^4.0.8"
}
},
"@vuepress/plugin-back-to-top": {
"version": "1.2.0",
"resolved": "https://registry.npm.taobao.org/@vuepress/plugin-back-to-top/download/@vuepress/plugin-back-to-top-1.2.0.tgz",
"integrity": "sha1-9rsvVzF+lKawtoVHGfMIhIHywN0=",
"dev": true,
"version": "1.3.0",
"resolved": "https://registry.npm.taobao.org/@vuepress/plugin-back-to-top/download/@vuepress/plugin-back-to-top-1.3.0.tgz",
"integrity": "sha1-AZOFgofWwYsw4xxHMOyuzvfI17U=",
"requires": {
"lodash.debounce": "^4.0.8"
}

View File

@ -6,8 +6,6 @@
"devDependencies": {
"@vssue/api-github-v4": "^1.2.1",
"@vssue/vuepress-plugin-vssue": "^1.2.0",
"@vuepress/plugin-active-header-links": "^1.0.0-rc.1",
"@vuepress/plugin-back-to-top": "^1.2.0",
"@vuepress/plugin-google-analytics": "^1.2.0",
"@vuepress/plugin-medium-zoom": "^1.2.0",
"@vuepress/plugin-nprogress": "^1.2.0",
@ -21,6 +19,8 @@
"vuepress-plugin-sitemap": "^2.1.2"
},
"dependencies": {
"@vuepress/plugin-active-header-links": "^1.3.0",
"@vuepress/plugin-back-to-top": "^1.3.0",
"@vuepress/plugin-pwa": "^1.2.0",
"animated-number-vue": "^1.0.0",
"aos": "^3.0.0-beta.6",

View File

@ -2,11 +2,23 @@ Kuboard v1.0.x 的更新说明
必须完成:
* 文档
* 教程
* 群反馈 Pod 列表界面出现重复数据的问题
**新特性**
* 增加 Grafana并与 Kuboard 实现单点登录
**优化**
* 去除dnsmasq直接使用 KUBE_DNS 进行 upstream 域名解析
BUG
* etcd 安装和备份文档
* kubeadm 安装之后的目录结构
------------------
* 修改 metadata.labels kuboard v1.0.7

View File

@ -9,11 +9,43 @@ description: 本文描述了Kuboard_v1.0.x的版本变更说明
了解如何 [升级Kuboard](/install/install-dashboard-upgrade.html)
* eipwork/kuboard:<span style="font-weight: 800; color: #007af5">latest</span> 当前对应的版本是 kuboard <span style="font-weight: 800; color: #007af5">v1.0.5.4</span>
* eipwork/kuboard:<span style="font-weight: 800; color: #42b983">beta</span> 当前对应的版本是 kuboard <span style="font-weight: 800; color: #42b983">v1.0.6-beta.9</span>
* eipwork/kuboard:<span style="font-weight: 800; color: #007af5">latest</span> 当前对应的版本是 kuboard <span style="font-weight: 800; color: #007af5">v1.0.6</span>
* eipwork/kuboard:<span style="font-weight: 800; color: #42b983">beta</span> 当前对应的版本是 kuboard <span style="font-weight: 800; color: #42b983">v1.0.6-beta.10</span>
Kuboard v1.0.x 的更新说明
## v1.0.6.1
**发布日期**
2020年2月10日
**优化**
* 显示 Service 的 Cluster IP
* 工作负载查看页面,单独显示 Workload/Service/Ingress 的 YAML
**BUG修正**
* 镜像版本页 --> 去除刷新按钮(其使用的查询条件不正确)
## v1.0.6
**发布日期**
2020年2月8日
**优化**
* 如果安装 metrics-server提示 ApiService 的状态
* 标签选择器支持更多的操作符:=, !=, in, notin, exists, notexists
* 字段选择器支持更多的操作符: =, !=
* 容器镜像版本调整页面 --> 使用fieldSelector 和 labelSelector
## v1.0.6-beta.10
**发布日期**
2020年2月7日
**Bug修正**
* 修复 beta.9 中引入的一个 BUG 不能新增 Service 的 ports
## v1.0.6-beta.9