docker安装kuboard

一、kuboard安装

kuboard可以部署在kubernetes集群之上,也可以部署在集群之外。作为管理多集群的图形化工具建议部署在集群之外。
安装步骤参考官方文档实现:https://kuboard.cn/install/v3/install-built-in.html

1、安装镜像

docker pull eipwork/kuboard:v3.5.0.3

2、新建目录

mkdir -p /home/apps/kuboard/data

3、创建并启动

docker run -d \
  --restart=unless-stopped \
  --name=kuboard \
  -p 6017:80/tcp \
  -p 10081:10081/tcp \
  -e KUBOARD_ENDPOINT="http://192.168.3.17:6017" \
  -e KUBOARD_AGENT_SERVER_TCP_PORT="10081" \
  -v /home/apps/kuboard/data:/data \
  eipwork/kuboard:v3.5.0.3

4、访问
192.168.3.17:6017,默认用户名密码:admin/Kuboard123

二、域名、反向代理配置

1、域名配置参考:https://www.cnblogs.com/lvlinguang/p/15195403.html
2、反向代理配置:在为 Kuboard 配置反向代理时,需要注意:

http {

  # 您需要的其他配置

  map $http_upgrade $connection_upgrade {
      default upgrade;
      '' close;
  }

  server {
    listen       80; 
    server_name  kuboard.test.com; # 替换成你的域名

    location / {
      proxy_pass http://192.168.3.17:6017/;  # 替换成你的 Kuboard IP 地址和端口,应该是 IP 地址,而不是 KUBOARD_ENDPOINT 参数的值
      client_max_body_size 10m;
      gzip on;
    }

    location /k8s-ws/ {
      proxy_pass  http://192.168.3.17:6017/k8s-ws/;  # 替换成你的 Kuboard IP 地址和端口
      proxy_http_version 1.1;
      proxy_pass_header Authorization;
      proxy_set_header Upgrade "websocket";
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      # proxy_set_header X-Forwarded-Proto https; # 如果您在反向代理上启用了 HTTPS
    }

    location /k8s-proxy/ {
      proxy_pass  http://192.168.3.17:6017/k8s-proxy/;  # 替换成你的 Kuboard IP 地址和端口
      proxy_http_version 1.1;
      proxy_pass_header Authorization;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;

      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      # proxy_set_header X-Forwarded-Proto https; # 如果您在反向代理上启用了 HTTPS
      gzip on;
    }

    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }
  }
}

三、参考

posted @ 2022-11-07 09:41  吕林光  阅读(1534)  评论(0编辑  收藏  举报