千云低代码平台ETMS-k8s实施部署

K8S环境安装

  • 部署守护服务
bash 复制代码
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: fingerprint-agent
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: fingerprint-agent
  template:
    metadata:
      labels:
        app: fingerprint-agent
    spec:
      containers:
      - name: agent
        image: alpine:3.18
        command: ["sh", "-c", "cat /host-sys/class/dmi/id/product_uuid > /data/product_uuid && sleep 3600"]
        volumeMounts:
        - name: sysfs
          mountPath: /host-sys
          readOnly: true
        - name: data
          mountPath: /data
      volumes:
      - name: sysfs
        hostPath:
          path: /sys
      - name: data
        hostPath:
          path: /var/lib/fingerprint-agent

拉取部署镜像

生产镜像仓库【etms】

2)版本名称:"项目名称-prod-" 开头

部署配置

  • 创建拉取镜像服务信息的secret
  • 创建提供外部 https 访问的TLS类型的 secret
  • 创建配置字典ConfigMap
    配置参数:.etms.srt 、.etmstest.srt 、Etms-Logback.xml 、application.properties
  • 创建pvc,同时创建pv

发布应用(创建pod)

bash 复制代码
kind: Deployment
apiVersion: apps/v1    
metadata:
  # 指定名称
  name: etms
  # 指定命名空间
  namespace: kuaixiu
  labels:
    app: etms
  annotations:
    deployment.kubernetes.io/revision: '37'
    kubesphere.io/creator: janle
spec:
  replicas: 1
  selector:
    matchLabels:
      app: etms-yunxiao
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: etms
      annotations:
        kubesphere.io/creator: janle
        # 使用名称为 aliyun 的 secret 的镜像服务配置信息
        kubesphere.io/imagepullsecrets: '{"etms":"aliyun"}'
        kubesphere.io/restartedAt: '2025-06-24T10:20:29.470Z'
        logging.kubesphere.io/logsidecar-config: '{}'
    spec:
      volumes:
        - name: config
          configMap:
            name: etms-auth
            defaultMode: 420
        - name: data-yunxiao
          # 指定 pvc
          persistentVolumeClaim:
            claimName: data-yunxiao
        - name: fingerprint-volume
          hostPath:
            path: /var/lib/fingerprint-agent/product_uuid
            type: ''
        - name: etms-srt
          hostPath:
            path: /home/.etms
            type: ''
      containers:
        - name: etms-yunxiao
          # 镜像版本
          image: >-
            registry.cn-zhangjiakou.aliyuncs.com/pro-qy566/etms:shengneng-prod-11-20250710155258
          ports:
            - name: http-18566
              containerPort: 18566
              protocol: TCP
          resources:
            limits:
              cpu: '2'
              memory: 4Gi
          volumeMounts:
            - name: config
              mountPath: /app/etmsServer/conf
            - name: data-yunxiao
              mountPath: /home/pic/
            - name: fingerprint-volume
              readOnly: true
              mountPath: /var/lib/fingerprint-agent/product_uuid
            - name: etms-srt
              mountPath: /root/.etms
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      serviceAccountName: default
      serviceAccount: default
      securityContext: {}
      # 镜像拉取secret
      imagePullSecrets:
        - name: aliyun
      schedulerName: default-scheduler
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600
相关推荐
2301_800050998 小时前
docker
运维·docker·容器
汪碧康11 小时前
【k8s-1.34.2安装部署】五.worker端containerd2.2.1、kubelet-1.34.2安装
docker·云原生·容器·kubernetes·jenkins·kubelet·xkube
小趴菜不能喝11 小时前
Docker 网络
网络·docker·容器
忙里偷闲学python12 小时前
docker
运维·docker·容器
API开发平台14 小时前
接口开发开源平台 Crabc 3.5.4 发布
低代码·开源
流之云低代码平台14 小时前
Gadmin与TPFLOW:打造高效OA系统的最佳搭档
低代码·gadmin·企业信息化oa系统·高效办公oa系统·oa系统选择·企业级开发平台·tpflow工作流引擎
惜.己16 小时前
安装windows版本docker(配置镜像源+拉取运行docker)
运维·docker·容器
流之云低代码平台16 小时前
告别繁琐合同管理,智能合同系统来助力
低代码·gadmin·智能合同系统优势·智能合同系统功能模块·智能合同系统应用案例·智能合同系统选择·企业合同管理痛点
极客小云17 小时前
【2026年Docker国内镜像源最新可用清单与配置指南】
运维·docker·容器
忍冬行者17 小时前
kubernetes安装traefik Gateway API,应对Ingress NGINX停止维护
云原生·kubernetes·云计算