FancyImage / 你的程序健康吗 / kubetrain.cn

This commit is contained in:
huanqing.shao
2019-11-10 20:26:09 +08:00
parent 8a452907a6
commit 2bb3c3cc8d
36 changed files with 1008 additions and 181 deletions

View File

@ -8,6 +8,8 @@ meta:
# 日志终端访问的问题
<AdSenseTitle/>
极少数情况下,您可能能够正常访问 Kuboard 和使用 Kuboard 的各项功能,但是,访问 Kuboard 提供的日志界面和终端界面时,始终会出现弹窗提示,并将您指引到了现在的这个页面上来。本文描述了如何排查 Kuboard 日志/终端界面不能访问的问题
## 第一步
@ -44,3 +46,57 @@ Kuboard 日志界面和终端界面都使用了 websocket 与服务器端通信
::: tip 如果还解决不了
请参考本文末尾的方式联系 Kuboard 团队
:::
## Ingress设置
如果通过 Ingress 的方式访问 Kuboard需要在 IngressController 上开启 websocket以 nginx-ingress 为例,下面的 YAML 可以开启 websocket。更多信息请参考 [Ingress 注解配置](/learning/k8s-intermediate/service/ingress-annotation.html)
``` yaml {8}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
annotations:
k8s.eip.work/displayName: kuboard
k8s.eip.work/workload: kuboard
nginx.com/sticky-cookie-services: serviceName=kuboard srv_id expires=1h path=/
nginx.org/websocket-services: kuboard
labels:
k8s.eip.work/layer: monitor
k8s.eip.work/name: kuboard
name: kuboard
namespace: kube-system
spec:
rules:
- host: kuboard.demo.kuboard.cn
http:
paths:
- backend:
serviceName: kuboard
servicePort: http
path: /
```
## 反向代理设置
如果您为 Kuboard 设置了 nginx 反向代理,请在 nginx 上开启 websocket配置文件如下所示
``` nginx {9,13,14}
server {
listen 80;
server_name kuboard.yourdomain.com; # 替换成你的域名
location / {
proxy_pass http://192.168.2.39:32567; # 替换成你的节点地址
proxy_http_version 1.1;
proxy_pass_header Authorization;
}
location /k8s-ws/ {
proxy_pass http://192.168.2.39:32567; # 替换成你的节点地址
proxy_http_version 1.1;
proxy_pass_header Authorization;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "upgrade";
}
gzip on;
}
```

View File

@ -8,6 +8,8 @@ meta:
# 错误提示
<AdSenseTitle/>
Kuboard中经常会出现如下情况某一个工作负载Deployment/StatefulSet/DaemonSet等显示为红色且有一个闪烁的红色 `E` 图标。
![image-20191108220746427](./warning.assets/image-20191108220746427.png)