首页 > 其他分享 >搭建kuboard-v3并配置使用ldap登录

搭建kuboard-v3并配置使用ldap登录

时间:2024-09-21 21:34:39浏览次数:9  
标签:cn LDAP v3 etcd ldap kuboard name

官方文档:https://www.kuboard.cn/install/v3/install-in-k8s.html

  1. namespace.yaml
点击查看代码
apiVersion: v1
kind: Namespace
metadata:
  name: kuboard
  1. configMap.yaml
点击查看代码
apiVersion: v1
kind: ConfigMap
metadata:
  name: kuboard-v3-config
  namespace: kuboard
data:
  # 关于如下参数的解释,请参考文档 https://kuboard.cn/install/v3/install-built-in.html
  # [common]
  KUBOARD_ENDPOINT: 'http://172.17.xxx.xxx:30080'
  KUBOARD_AGENT_SERVER_UDP_PORT: '30081'
  KUBOARD_AGENT_SERVER_TCP_PORT: '30081'
  KUBOARD_SERVER_LOGRUS_LEVEL: info  # error / debug / trace
  # KUBOARD_AGENT_KEY 是 Agent 与 Kuboard 通信时的密钥,请修改为一个任意的包含字母、数字的32位字符串,此密钥变更后,需要删除 Kuboard Agent 重新导入。
  KUBOARD_AGENT_KEY: 32b7d6572c6255211b4eec9009e4a816

  # 关于如下参数的解释,请参考文档 https://kuboard.cn/install/v3/install-gitlab.html
  # [gitlab login]
  # KUBOARD_LOGIN_TYPE: "gitlab"
  # KUBOARD_ROOT_USER: "your-user-name-in-gitlab"
  # GITLAB_BASE_URL: "http://gitlab.mycompany.com"
  # GITLAB_APPLICATION_ID: "7c10882aa46810a0402d17c66103894ac5e43d6130b81c17f7f2d8ae182040b5"
  # GITLAB_CLIENT_SECRET: "77c149bd3a4b6870bffa1a1afaf37cba28a1817f4cf518699065f5a8fe958889"

  # 关于如下参数的解释,请参考文档 https://kuboard.cn/install/v3/install-github.html
  # [github login]
  # KUBOARD_LOGIN_TYPE: "github"
  # KUBOARD_ROOT_USER: "your-user-name-in-github"
  # GITHUB_CLIENT_ID: "17577d45e4de7dad88e0"
  # GITHUB_CLIENT_SECRET: "ff738553a8c7e9ad39569c8d02c1d85ec19115a7"

  # 关于如下参数的解释,请参考文档 https://kuboard.cn/install/v3/install-ldap.html
  # [ldap login]
  KUBOARD_LOGIN_TYPE: "ldap"
  KUBOARD_ROOT_USER: "[email protected]"
  LDAP_HOST: "pandas.xxx.it.cn:389"
  LDAP_BIND_DN: "cn=readonly,dc=xxx,dc=cn"
  LDAP_BIND_PASSWORD: "123456"
  LDAP_BASE_DN: "ou=People,dc=xxx,dc=cn"
  LDAP_FILTER: "(&(objectClass=itcastPerson)(isDeleted=false)(status=1)(isEnabled=true))"
  LDAP_ID_ATTRIBUTE: "userName"
  LDAP_USER_NAME_ATTRIBUTE: "userName"
  LDAP_EMAIL_ATTRIBUTE: "email"
  LDAP_DISPLAY_NAME_ATTRIBUTE: "cn"
  # 组设置
  LDAP_GROUP_SEARCH_BASE_DN: "name=Department,dc=xxx,dc=cn"
  LDAP_GROUP_SEARCH_FILTER: "(&(objectClass=itcastDepartment)(isDeleted=false)(status=1)(isEnabled=true))"
  LDAP_USER_MACHER_USER_ATTRIBUTE: "departmentId"
  LDAP_USER_MACHER_GROUP_ATTRIBUTE: "id"
  LDAP_GROUP_NAME_ATTRIBUTE: "name"

  1. statefulset.yaml
点击查看代码
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: kuboard-etcd
  namespace: kuboard
  labels:
    app: kuboard-etcd
spec:
  serviceName: kuboard-etcd
  replicas: 3
  selector:
    matchLabels:
      app: kuboard-etcd
  template:
    metadata:
      name: kuboard-etcd
      labels:
        app: kuboard-etcd
    spec:
      containers:
      - name: kuboard-etcd
        image: swr.cn-east-2.myhuaweicloud.com/kuboard/etcd:v3.4.14
        ports:
        - containerPort: 2379
          name: client
        - containerPort: 2380
          name: peer
        env:
        - name: KUBOARD_ETCD_ENDPOINTS
          value: >-
            kuboard-etcd-0.kuboard-etcd:2379,kuboard-etcd-1.kuboard-etcd:2379,kuboard-etcd-2.kuboard-etcd:2379
        volumeMounts:
        - name: data
          mountPath: /data
        command:
          - /bin/sh
          - -c
          - |
            PEERS="kuboard-etcd-0=http://kuboard-etcd-0.kuboard-etcd:2380,kuboard-etcd-1=http://kuboard-etcd-1.kuboard-etcd:2380,kuboard-etcd-2=http://kuboard-etcd-2.kuboard-etcd:2380"
            exec etcd --name {HOSTNAME} \
              --listen-peer-urls http://0.0.0.0:2380 \
              --listen-client-urls http://0.0.0.0:2379 \
              --advertise-client-urls http://{HOSTNAME}.kuboard-etcd:2379 \
              --initial-advertise-peer-urls http://{HOSTNAME}:2380 \
              --initial-cluster-token kuboard-etcd-cluster-1 \
              --initial-cluster{PEERS} \
              --initial-cluster-state new \
              --auto-compaction-retention 1 \
              --quota-backend-bytes 8388608000 \
              --data-dir /data/kuboard.etcd
  volumeClaimTemplates:
  - metadata:
      name: data
    spec:
      # 请填写一个有效的 StorageClass name
      storageClassName: nfs-client
      accessModes: [ "ReadWriteMany" ]
      resources:
        requests:
          storage: 5Gi

  1. etcd-service.yaml
点击查看代码
apiVersion: v1
kind: Service
metadata:
  name: kuboard-etcd
  namespace: kuboard
spec:
  type: ClusterIP
  ports:
  - port: 2379
    name: client
  - port: 2380
    name: peer
  selector:
    app: kuboard-etcd

  1. deployment.yaml
点击查看代码
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: '9'
    k8s.kuboard.cn/ingress: 'false'
    k8s.kuboard.cn/service: NodePort
    k8s.kuboard.cn/workload: kuboard-v3
  labels:
    k8s.kuboard.cn/name: kuboard-v3
  name: kuboard-v3
  namespace: kuboard
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s.kuboard.cn/name: kuboard-v3
  template:
    metadata:
      labels:
        k8s.kuboard.cn/name: kuboard-v3
    spec:
      containers:
        - env:
            - name: KUBOARD_ETCD_ENDPOINTS
              value: >-
                kuboard-etcd-0.kuboard-etcd:2379,kuboard-etcd-1.kuboard-etcd:2379,kuboard-etcd-2.kuboard-etcd:2379
          envFrom:
            - configMapRef:
                name: kuboard-v3-config
          image: 'swr.cn-east-2.myhuaweicloud.com/kuboard/kuboard:v3.5.2.4'
          imagePullPolicy: Always
          name: kuboard

  1. kuboard-service.yaml
点击查看代码
apiVersion: v1
kind: Service
metadata:
  annotations:
    k8s.kuboard.cn/workload: kuboard-v3
  labels:
    k8s.kuboard.cn/name: kuboard-v3
  name: kuboard-v3
  namespace: kuboard
spec:
  ports:
    - name: webui
      port: 80
      protocol: TCP
      targetPort: 80
    - name: agentservertcp
      port: 10081
      protocol: TCP
      targetPort: 10081
    - name: agentserverudp
      port: 10081
      protocol: UDP
      targetPort: 10081
  selector:
    k8s.kuboard.cn/name: kuboard-v3
  sessionAffinity: None
  type: ClusterIP

  1. ingress.yaml
点击查看代码
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: kuboard-v3
  namespace: kuboard
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: 'true'
    k8s.kuboard.cn/displayName: kuboard
    k8s.kuboard.cn/workload: kuboard
    nginx.org/websocket-services: "kuboard"
    nginx.com/sticky-cookie-services: "serviceName=kuboard srv_id expires=1h path=/"
spec:
  tls:
  - hosts:
    - kuboard.xxx.xxx
    secretName: xxx-xxx
  rules:
  - host: kuboard.xxx.xxx
    http:
      paths:
      - path: /
        backend:
          serviceName: kuboard-v3
          servicePort: webui

  1. 获取管理员token
点击查看代码
kubectl -n kube-system get secret (kubectl -n kube-system get secret | grep kuboard-user | awk '{print1}') -o go-template='{{.data.token}}' | base64 -d

标签:cn,LDAP,v3,etcd,ldap,kuboard,name
From: https://www.cnblogs.com/ruiops/p/18424544

相关文章

  • Python项目有哪些常用LDAP连接与认证的方法以及他们的特性
    django-auth-ldap和ldap3都是用于与LDAP(轻量级目录访问协议)服务器(如ActiveDirectory)交互的Python库,但它们在设计目标、实现方式和集成方式上有显著的不同。理解它们的区别对于选择适合你项目需求的解决方案至关重要。以下是对这两个库的详细比较,以及它们在配置后端身份验证......
  • jeecg v3 modal
    <template><BasicModalv-bind="$attrs"@register="register"title="地图"@visible-change="handleVisibleChange"><divclass="pt-3pxpr-3px"><BasicForm@register="registerFo......
  • jeecg v3 表格自定义按钮打开Modal并传参
    List列表页面行内添加自定义按钮,弹出自定义页面分五步1.在template里加入<UrAdspotsMapModal@register="register4"/>2.在脚本中importimportUrAdspotsMapModalfrom'./components/UrAdspotsMapModal.vue'3.在script里注册const[register4,{openMo......
  • 电子封条监控系统 YOLOv3
    电子封条监控系统利用电子封条和监控设备相结合,电子封条监控系统利用智能化视频识别等技术,实现对矿井内外的出入人员、人数变化及非煤矿山生产作业状态等情况的实时监测和分析,及时发现非煤矿山异常动态,减少了人为介入的过程,节约了大量的人力和物力资源。电子封条监控系统能够实时监......
  • centos7LDAP服务搭建
    ladp服务搭建用户名:cn=admin,dc=test,dc=com密码:1234561)软件安装yuminstallopenldapopenldap-clientsopenldap-servers-y2)配置OpenLDAPServervim/etc/openldap/slapd.d/cn=config/olcDatabase={1}monitor.ldif将cn=Manager,dc=my-domain,dc=com改为你自己的,内容可以随......
  • 深入理解JNDI注入—RMI/LDAP攻击
    目录前言JNDI注入简单理解透过Weblogic漏洞深入理解RMI与LDAP的区别JNDI+RMI漏洞代码触发链lookup触发链JNDI+LDAP前言本篇文章初衷是在研究log4j2漏洞时候找不到一篇完整且能够真正让我理解漏洞根因的文章,导致我想写一篇通俗易懂能理解到底啥是JNDI注入,怎么lookup的。当然不......
  • 容器化部署LDAP
    容器化部署LDAP和PHP-LDAP-Admin可以帮助你在Docker环境中快速搭建和管理LDAP服务。1.部署OpenLDAP容器password='123456'dockerrun\-d-p389:389-p636:636\--nameopenldap\--restart=always\--hostnameopenldap\-v/data/docker_tmp/openldap......
  • jsp穿搭购物系统vv348
    jsp穿搭购物系统vv348本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表项目功能用户,商品分类,服饰信息,穿搭分类,穿搭分享开题报告内容一、项目背景与意义在当今社会,个性化与时尚成为了人们追求的重要生活......
  • [Python学习日记-23] Python v2 和 v3 中的字符编码
    简介    在Python中的字符编码(上)和Python中的字符编码(下)中学习了字符编码的理论知识那么就,我们把目光回到Python当中,下面我们来讲述一下Python2和Python3之间的一些关于编码的差别。Python2vsPython3的编码一、Python2    Python出来时还没有......
  • LdapSrvWeight和LdapSrvPriority一起使用时,优先级如何确定?
    LdapSrvWeight和LdapSrvPriority一起使用时,LdapSrvPriority的优先级高于LdapSrvWeight。LdapSrvPriority直接决定了域控制器的优先级顺序,值越低表示优先级越高,客户端会优先尝试连接这些域控制器。而LdapSrvWeight则是按照比例来分配客户端连接请求,当LdapSrvPriority相同的域控制器......