千云低代码平台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
相关推荐
fengkai454510 分钟前
2、Kubernetes 介绍+安装+卸载
运维·容器·kubernetes
羑悻的小杀马特18 分钟前
超越Bridge:全面掌握Docker网络隔离与通信的底层逻辑!
运维·网络·docker·容器
小马同学-40 分钟前
K8s 节点管理:查看、维护与集群删除操作
容器·kubernetes
什么嘻嘻果冻21 小时前
无代码开发平台的技术架构,恐象 AI 的生成引擎拆解
大数据·人工智能·低代码
艾伦_耶格宇1 天前
【DOCKER容器实战】-5 Docker容器镜像的构建
运维·docker·容器
分布式存储与RustFS1 天前
RustFS 该跟 stable 还是 nightly?两条版本线的分工、风险与回退,一张表说清
运维·云原生·开源·对象存储·分布式存储·s3·性能基准
驰骋工作流1 天前
低代码开发平台设计方向之一:基于菜单体系的开发平台设计驰骋BPM驰骋低代码低代码工作流引擎
低代码
ggaofeng1 天前
k8s中的dns
云原生·容器·kubernetes
姜鱼问生2 天前
每次开机手动检查 6 样东西?我写了个 2 秒自检脚本
运维·网络·nginx·docker·容器
wangqiaowq2 天前
PostgresSQL server Docker 安装部署
运维·docker·容器