zoukankan      html  css  js  c++  java
  • Jenkins-deploymnt

    kind: Deployment
    apiVersion: apps/v1
    metadata:
      name: jenkins
      namespace: paas-jenkins
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: jenkins
      template:
        metadata:
          labels:
            app: jenkins
        spec:
          serviceAccount: paas-jenkins-sa
          containers:
          - name: jenkins
            image: jenkins/jenkins:lts
            imagePullPolicy: IfNotPresent
            ports:
            - containerPort: 8080
              name: web
              protocol: TCP
            - containerPort: 50000
              name: agent
              protocol: TCP
            resources:
              limits:
                cpu: 1000m
                memory: 1Gi
              requests:
                cpu: 500m
                memory: 512Mi
            livenessProbe:
              httpGet:
                path: /login
                port: 8080
              initialDelaySeconds: 60
              timeoutSeconds: 5
              failureThreshold: 12
            readinessProbe:
              httpGet:
                path: /login
                port: 8080
              initialDelaySeconds: 60
              timeoutSeconds: 5
              failureThreshold: 12
            volumeMounts:
            - name: jenkins-volume
              subPath: jenkins-home
              mountPath: /var/jenkins_home
          volumes:
          - name: jenkins-volume
            persistentVolumeClaim:
              claimName: paas-jenkins-pvc
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: jenkins-service
      namespace: paas-jenkins
      labels:
        app: jenkins
    spec:
      selector:
        app: jenkins
      type: NodePort
      ports:
      - name: web
        port: 8080
        targetPort: web
        nodePort: 30002
      - name: agent
        port: 50000
        targetPort: agent
    
  • 相关阅读:
    tensorflow模型保存和使用08
    LSTM最基本的应用(07-3)
    手写数字识别-卷积神经网络cnn(06-2)
    python面向对象笔记
    attention机制
    dockerfile
    docker入门
    CentOS7安装Oracle11gR2
    anaconda常用的命令
    python xlrd处理表格常用方法
  • 原文地址:https://www.cnblogs.com/fan-gx/p/12811724.html
Copyright © 2011-2022 走看看