• xxl-job安装部署文档


    xxl-job安装部署文档

    注意:替换yaml文件中的mysql地址

    安装方式

    kubectl apply -f xxl-job.yaml -n xxxx
    

    安装配置文件

    xxl-job.yaml

    ##创建PV
    ---
    apiVersion: v1
    kind: PersistentVolume
    metadata:
     name: xxl-job-admin-logs-pv
     labels:
       pv: xxl-job-admin-logs-pv
    spec:
     capacity:
       storage: 5Gi
     accessModes:
       - ReadWriteMany
     persistentVolumeReclaimPolicy: Retain
     nfs:
       server: xxxxx
       path: /data/k8s
    ---
    ##创建pvc
    ---
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
     name: xxl-job-admin-logs-pvc
    spec:
     accessModes:
       - ReadWriteMany
     resources:
       requests:
         storage: 5Gi
     selector:
       matchLabels:
         pv: xxl-job-admin-logs-pv
    ---
    ##创建xxl-job
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: xxl-job-admin
      labels:
        name: xxl-job-admin
    spec:
      replicas: 1
      selector:
        matchLabels:
          name: xxl-job-admin
      template:
        metadata:
          labels:
            name: xxl-job-admin
        spec:
          containers:
          - name: xxl-job-admin
            image: xuxueli/xxl-job-admin:2.1.0
            ports:
            - containerPort: 8080
            env:
            #  替换yaml文件中的mysql地址
            - name: PARAMS
              value: "--spring.datasource.url=jdbc:mysql://192.168.8.224:3306/xxl_job?Unicode=true&characterEncoding=UTF-8&useSSL=false --spring.datasource.username=root --spring.datasource.password=root123 --spring.mail.username=716@qq.com --spring.mail.password=abcd"
            volumeMounts:
            - mountPath: /data/applogs
              name: xxl-job-admin-logs
          volumes:
          - name: xxl-job-admin-logs
            persistentVolumeClaim:
              claimName: xxl-job-admin-logs-pvc
    ---
    
  • 相关阅读:
    pip本地源搭建
    linux 创建 bootable iso 文件
    yum 源本地化 (two)
    linux 网络配置
    linux 设置root可以远程登陆
    察看linux 发行版
    mysql bin-log 设置
    samba 奇怪问题
    delphi中的临界区
    ligerGrid 取得选中行的数据
  • 原文地址:https://www.cnblogs.com/lanheader/p/14153839.html
Copyright © 2020-2023  润新知